A 24-year-old man has said he thought he had been set up when he was arrested on suspicion of raping a 16-year-old girl in an alleyway in East Sussex.
Katie Davis denies making a false claim of rape in an alleyway
Frank Chisholm, of Battle Road, St Leonards, told Lewes Crown Court he was "angry and upset" at the accusation.
A charge of rape was dropped after he had been on remand in Lewes Prison for six weeks following a DNA match.
Katie Davis, 18, of Blackman Avenue, denies intending to pervert the course of justice with a false claim of rape.
The court has heard she made up the allegation because she feared she could be pregnant after having unprotected sex.
Railway worker Mr Chisholm told the court he had been drunk after a spending the evening of 6 March last year in several pubs in Hastings.
After getting a taxi back to St Leonards he visited his mother nearby, leaving just before midnight.
During the 10-minute walk home he met a girl he recognised as working in the One Stop Shop in Blackman Avenue.
"I don't remember the conversation we had but I invited her in and showed her around," he said. "We just got carried away, to be honest with you."
He said they stripped off and had unprotected sex and he fell asleep, waking the next morning to find the girl gone.
He said he did not remember what had happened until he found her work badge on his floor.
Frank Chisholm said he and the girl had consensual sex at his home
The court was told police knocked on Mr Chisholm's door during house-to-house inquiries after they were told a 16-year-old girl had been raped by a balaclava-clad man in an alleyway off Battle Road that night.
But Mr Chisholm made no connection with their inquiries and what had happened with the girl.
A week after the alleged rape he was arrested and later charged.
Under cross examination, he was told the reason he could not remember the girl's name was because he had grabbed her in the dark and raped her.
He replied: "I never touched that girl."
The jury heard on Wednesday the charge against Mr Chisholm was dropped after tests carried out on fibres found on Ms Davis's work fleece showed it had been in direct contact with the duvet on Mr Chisholm's bed.
The case continues.