The jury in the trial of Ismail Ahmed heard the 27-year-old was caught when he followed up a call to police with another to the victim's mobile phone while she was being interviewed by officers.
Matthew Brookes-Baker, prosecuting, said the girl, w
hose identity is protected by law, had been walking home after a night out in Northampton town centre on August 2 when she met Ahmed.
He said: "She had been out in the town centre with some friends until the early hours. They had been to bars and consumed alcohol.
"Later she became separated from her friends and decided to walk home. She was in Abington Square when she encountered the defendant. He approached her, started to talk to her and they walked together."
Mr Brookes-Baker said initially there had been no problems between the two but, as they neared Fiddlers public house in Wellingborough Road, Ahmed tried to kiss the girl.
He said: "She initially resisted by turning her face away. He said words to the effect of 'Just give me one kiss'. She decided if she did that he might leave her alone. She gave him a kiss and a hug."
Mr Brookes-Baker told the court Ahmed, of Elizabeth Walk, Northampton town centre, then led the girl behind the public house and raped her twice, before taking her number from her mobile phone and leaving.
The jury was told Ahmed was later arrested after calling 999 to say he had been locked out of his house by his wife and was concerned for her safety as he was unable to contact her.
He then made a call to the girl's mobile phone and police were able to connect the two through his phone number, the court heard.
Mr Brookes-Baker said Ahmed had admitted to police in interview he had met and spoken to the girl.
He said Ahmed claimed she was visibly drunk and stumbling and told officers he had been concerned for her welfare.
He told jurors Ahmed claimed the girl kissed him and performed a sex act on him but denied raping her and said he had only called to make sure she had got home.
The trial continues.