Charlene Kielty kept up the lie for 16 months before she confessed to police she had made the story up.
A woman who claimed she was dragged to the back of a bus and raped by the driver because she was "feeling unloved" has been jailed for 18 months.
It took Charlene Kielty 16 months before she admitted to police that her allegation of rape was a lie.
The man she accused of raping her said he was "shocked" and "very upset" at the allegation.
The 23-year-old told police officers she had been attacked at the back of a bus parked at Cromdale in Strathspey by a man she named as "Chris from Inverness".
Jailing her at Inverness Sheriff Court on Tuesday, sheriff Ian Abercrombie said: "For months you maintained this deception and it is only today that the driver has had his name cleared.
"One cannot imagine the distress that you caused him and his family. This was a very serious allegation against a totally innocent bus driver.
"The public depend on them for their safety and have to have complete trust in them."
The woman, of Grosvenor Hotel, Inverness, was sobbing as she was led away from the court in handcuffs.
A statement from the bus driver she accused, read out in court, said: "I was so shocked that this allegation was made against me. I was very upset because I am not capable of raping anyone.
"I co-operated full because I knew I was innocent. My partner, who was pregnant at the time, and my parents believed me and fully supported me throughout. That has helped me get on with my life."
The court heard that she had made the allegation several times since reporting it on August 23, 2009.
Depute fiscal Ian Smith said she had gone to Aviemore Health Centre complaining of abdominal pains and told staff she had been raped four days earlier by the bus driver.
She was taken to Raigmore Hospital for tests and gave a full description of her alleged attacker to police officers.
The man she named turned up at the police station voluntarily and consented to a forensic examination to be carried out.
Suspicions arose that Kielty had lied about the rape but it was not until December 16, 2010 that she confessed she had made up the story.
Defence solicitor Iain Innes told the court: "She was suffering from borderline personality disorder and has difficulty cementing relationships, even with her parents.
"She was suffering from depression, and was suicidal at the time. Feeling unloved, at last someone was paying her attention and this appears to be the reason."