But the former business minister said the student, whom she declined to name, had only stopped when she warned he would be raping her after repeatedly attempting to push him away.
“I could hardly believe that this guy, who was a nice guy with whom I got on well, was not responding to me saying ‘no’ and trying to push him off,”
Ms Swinson said. “He was about to do something horrendous and I managed to get him to stop. I told him, ‘If you make me, that’s rape’.
“I was a teenager and if I’d had a lot to drink, I might have said ‘no’ and pushed him off, but I might not have had the presence of mind to use the R-word.
“If I hadn’t had my wits about me and been more fearful, who knows what might have happened?
“There were plenty of women I knew in my year who were much less assertive than I was.
“At the time it was a desperate attempt to guarantee my safety. The words seemed to finally bring him to his senses and he stopped.”
The MP for East Dunbartonshire revealed her attack in a new book, Equal Power.
She said one female university student in four had suffered unwanted physical sexual advances.
She added: “Most people who are raped are raped by people they know.
“My heart was beating very fast and I was angry.
“There is this view among many that this violence against women is something which is the stranger leaping out of the dark alley, or a whole different series of horrible people that they wouldn’t have anything to do with.
“Actually, what I took from that experience was that I could very easily see how rape could happen and the rapist could be a nice young man who would not consider that would be something he could do.
“Until I’d used the word ‘rape’ he didn’t realise that was the situation, so somehow me saying ‘no’ and pushing him off was not computing in his brain.
Afterwards, I realised that I’d had a really close escape.”
Ms Swinson sparked controversy on the BBC’s Victoria Derbyshire show last week by using the word “c**k” on live TV.
She was taking part in a debate on misogyny and backed a pilot scheme in Nottinghamshire that enables women to report abuse as a hate crime.