Gary Glitter broke down in tears as he tried to explain to jurors why he had been in possession of indecent images of children.
Sobbing uncontrollably during his trial for attempted rape and indecent assault at Southwark Crown Court, the 70-year-old said he had been in a bad place in his life, and was struggling financially, with alcohol and with drugs at the time of the conviction in the late 1990s.
Speaking from the witness box, he said: "I lost my own dignity, and I am so sorry. I am very sorry. I am sorry today and every day of my life ever since. I am sorry to my fans."
Gary Glitter outside court
In November 1997, when Glitter went to pick up a laptop he had given for servicing at PC World, he was arrested.
The engineer who examined the machine had discovered indecent images of children.
Glitter subsequently admitted responsibility for a "large number" of images - depicting a full range of sexual activity taking place between men and very young children.
Glitter - real name Paul Gadd - is on trial accused of one count of attempted rape and another of indecent assault on a girl under the age of 13 in 1975.
He is also accused of two counts of indecent assault with regard to another fan he is said to have assaulted after inviting her to his dressing room after a concert between October 1979 and December 1980.
Glitter is charged with two counts of indecent assault between October 1979 and December 1980 on a third complainant, who was under 16.
He denies all the charges.
Prosecutor John Price QC, asked the singer: "Why were you looking at pictures of men having sex with young children?"
Immediately breaking into sobs and reaching for a tissue, Glitter replied: "I was in a very bad place in my life at that time and I had a lot of very serious decisions to make about my future."
He added that he had invested £200,000 in his own career, and that his record company and fans were demanding a lot from him.
Glitter continued: "By the time I had taken my computer to PC World, I then had other allegations come in so the lawyers' fees and the lawyers' bills were tremendous. And I also missed my girlfriend who lived in Cuba. I couldn't get her out of Cuba."
Breaking down again, the singer continued: "I still can't get her out of Cuba."
Holding his head in his hands and taking off his glasses to wipe away tears, Glitter addressed Judge Alistair McCreath, saying: "Forgive me my lord, it has been devastating for me."
After taking a couple of minutes to compose himself, Glitter told the court he had accepted responsibility for the images and had been to prison.
"I was drinking heavily, I was doing drugs, and the other thing of course is that I had to find this money to pay for the legal costs and studio, and I was asked by my management to seriously do the one thing which was absolutely terrible - which was to sell my songs.
"To sell my songs to Universal Pictures, and I regret it. I was just in a bad place. I went to prison, I came out. I was remorseful and I am remorseful. I am so sorry. It changed my life forever. I lost my honour, I lost my family."
Glitter added that he was just in the most "awful, awful place".
Gary Glitter in a court sketch from his trial
He told the court that at that stage in his life he was not able to empathise with the child victims of the indecent images that were found on his computer, but added that he now recognised the damage caused to the vulnerable youngsters.
The singer said: "It has to stop, all this internet pornography of children. It has to stop, no doubt about, no doubt about."
When asked again by Mr Price why he had looked at the images, Glitter said he did not know, but may have simply been "curious".
He added: "I was abused as a child so maybe I was trying to work my own feelings out. Today it would not happen, I have no interest in looking at that awful porn now.
"Absolutely no interest at all, it has destroyed my life, it has destroyed my family's life and it has most likely destroyed all those poor victims' lives - I have total empathy for those poor children."
Mr Price suggested that Glitter had been aroused by the pictures, but the star denied this saying that he had "paid" for it, and reiterated that he had no sexual interest in children.
"God knows I have paid for it," he sobbed.
Glitter was then asked about the accusation that he tried to rape a schoolgirl after climbing into her bed.
Gary Glitter in his heyday
It is alleged that the youngster was lying in bed with a friend when the singer is said to have attacked her in 1975.
But Glitter said he had no recollection of the little girl, asserting that he did not try to rape her.
He added that he had no clue why she had made up the allegations.
"I can't say why anybody would dislike me," Glitter told jurors. "I did not try to rape her or any other child."
The singer continued: "I have absolutely racked my brains to wonder why she could say such a terrible thing."
When asked by Mr Price if he would be interested in raping a young girl, Glitter replied: "Absolutely not, why would I do something like that?
"I have always got girlfriends around me, plenty of women around me, why would I want to do something like that?"
Mr Price suggested that it was because in 1997 he seemed to have an interest in underage sex, as his conviction for the images indicated.
"I ventured into all sorts of porn in which that awful stuff appeared. I pleaded guilty to it, I was guilty of it and I went to jail, and I have been remorseful ever since," Glitter replied.
The trial continues.