Former glam rock singer Gary Glitter crept into a schoolgirl's bed and tried to rape her at the height of his fame, a court heard.
The youngster only avoided being raped because she fell into a protective "cocoon" of sheets and blankets, before fleeing when the drunken pop star fell asleep, jurors were told.
John Price QC, opening the case for the prosecution at Southwark Crown Court, said that Glitter - real name Paul Gadd - had tried to force himself on the girl in the mid-1970s.
Glitter in court today, an artist's impression
He added: "She only managed to prevent him from succeeding by moving away from him in the bed until she had moved so far, they she remembers she fell into the 'envelope' or 'cocoon' formed at the edge of the bed by the fact that the covers and blankets had been tucked beneath the mattress."
The woman, who was aged under 10 at the time and cannot be identified for legal reasons, claims that after the attack Glitter fell asleep.
She then ran into a bathroom to try and clean herself, the court heard.
It is alleged that the day after the attack, Glitter acted as if nothing had happened and gave the girl chocolate.
Mr Price said: "The next day Mr Gadd behaved entirely as normal. Nothing was said (to her) about what had happened."
Dressed in a navy suit jacket, grey and dark blue striped jumper and wearing a cream and black patterned scarf, the aurally impaired singer followed proceedings with the help of lipspeakers.
Glitter, from Marylebone in central London, denies seven counts of indecent assault, one count of attempted rape, and two other sexual offences.
Although the alleged victim confided in her mother and friends, it was 20 years before she went to police with her claims, after seeing that Glitter had admitted child pornography charges in 1999, the court heard.
Gary Glitter outside the court today
Mr Price told the jury that if they do not believe the defendant committed attempted rape during the incident, they can convict him of indecent assault.
He said that she "did not, in fact, have the capacity to consent to such an act". It is also alleged that some years after the attempted rape, Glitter summoned the girl into a bedroom and asked her to give him a "cuddle".
"She tried to do so quickly and awkwardly but he took hold of her and he rolled her on to her back on the bed.
"She remembers that when he did that she felt frightened."
Mr Price went on: "She summoned the courage to say 'No', she got up from the bed and she left the room."
Jurors were told that in November 1997 when Glitter went to pick up a Toshiba laptop he had given for servicing at a Bristol PC World, he was arrested.
The engineer who examined the machine discovered images on it related to child pornography. 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 - being on his computer.
Mr Price said: "It encouraged her (the alleged victim) to report to the police, for the first time, what she says he had done to her.
"It seemed to her that recent events in Bristol - as she understood them to be from the publicity - offered a better chance that she might be believed when accusing so famous and popular a man of so dreadful a crime."
About a month after the second incident, the youngster told her mother what had happened, and is also said to have told other friends of her ordeal, something which the prosecution submits is of "great importance".
When the former chart-topper was arrested in connection with these allegations, he denied any wrongdoing through his solicitor.
An artist's impression of Glitter in court
Glitter is accused of one count of attempted rape and another of indecent assault on a girl under the age of 13 in 1975.
In relation to a second complainant, he is charged with four counts of indecent assault when she was under the age of 13 in 1977.
He is also accused of plying the girl with alcohol with the intention to "stupefy or overpower" her to have sex with him between January and May 1977.
And Glitter faces one charge of unlawful intercourse with a girl aged under 13 between the same dates in relation to the same girl.
In connection with a third complainant, who was under the age of 16, he is charged with two counts of indecent assault between October 1979 and December 1980.
Glitter is also accused of molesting two "young fans" whom he met while touring the country.
In each case, the girls are said to have first met the singer in his dressing room after a concert that their mothers took them to.
The similarities stretched to each girl initially being introduced to Glitter in the presence of her mother, and the mother then being persuaded to leave her daughter alone with him, jurors heard.
Mr Price said: "There are two other complainants in the case. Two other women, as they now are, who allege that when they were children they were sexually assaulted by this defendant."
One woman claims she was just 12 when Glitter plied her with champagne and then set upon her after a 1977 concert in a Leicester club called Baileys.
Over time the youngster was to attend a number of the former star's performances.
On the second occasion she is said to have gone with her mother to Glitter's dressing room, before both of them were invited to his Holiday Inn hotel suite.
Mr Price told jurors: "It was there, in his hotel bedroom, her mother having been taken elsewhere by someone else, that she says he subjected her to a prolonged episode of sexual abuse involving a full range of sexual activity culminating in intercourse, prior to which he plied her with alcohol - champagne."
He added that consent was not an issue because the girl, now a 50-year-old woman, was a child at the time.
Jurors also heard that the teenager was subjected to a similar ordeal in a Birmingham hotel room when she was 13 years old, an age that she remembers because it coincided with her first period.
Mr Price continued: "There is no doubt that (she) did attend concerts performed by this defendant. There can be no doubt thay she was allowed the privilege - if that is what it was - of joining him backstage, as they sometimes say. She has produced a number of old photographs which prove it."
Jurors were then shown a number of photos of the young girl with her mother, and with Glitter, some of them showing bottles of champagne in ice buckets.
Glitter found fame in the 1970s as part of the glam rock scene, scoring number one hits with I'm The Leader Of The Gang (I Am), I Love You Love Me Love and Always Yours.