A failed asylum seeker who raped a student in his Bradford flat has been warned that he faces four years in prison.

Nigerian law graduate Victor Giwa-Osagie, 34, was told by Judge Peter Benson that he will be deported back to his own country after he heard how he forced himself on his 21-year-old victim.

Giwa-Osagie had denied the offence and was due to stand trial at Bradford Crown Court today but before a jury was sworn in he pleaded guilty to rape.

Prosecutor Nicholas Askins outlined the case and described how the defendant and the complainant, who cannot be identified for legal reasons, had been drinking in a Bradford nightclub before getting a taxi back to her flat in Leeds. But Mr Askins said that she had lost her keys so they got in another cab and went back to Giwa-Osagie's flat at Shaftsbury Avenue, Manningham, Bradford.

Once there the pair carried on drinking and Giwa-Osagie began making sexual advances and tried to kiss her. The judge was told that she then made it clear that she just wanted to be friends.

Giwa-Osagie then said that he was going to bed and told her that she could sleep in the same bed. She agreed, took off her jeans for comfort and wrapped herself in the quilt.

But as she was lying there Giwa-Osagie turned her on to her back and pinned her down on the bed by her arms.

She was struggling to get free as the defendant performed a sex act on her before he raped her. In her statement the complainant said that she had been punching him repeatedly in the face to try to get him to stop.

After the attack the woman left the flat and made a tearful 999 call to the police which was played to the judge.

The clearly distressed victim wept as she repeatedly said: "Oh my God, I've just been raped."

Judge Benson was asked by Giwa-Osagie's barrister Jeremy Hill-Baker to indicate the maximum sentence he would impose if his client pleaded guilty. Judge Benson said four years.

Mr Hill-Baker then left court to talk to his client and when returned the defendant changed his plea to guilty.

Judge Benson adjourned the case for reports to be prepared and Giwa-Osagie will be sentenced at Leeds Crown Court next month.