A woman who walked into a police station, lied and said a taxi driver had tried to rape her has been jailed for 13 months.

Fiona Scanlan, 40, claimed she was attacked by William Millar shortly after she drunkenly left a wedding in South Lanarkshire in March 2014.

The 40-year-old woman admitted last month that she told officers her taxi driver had taken her to a quiet area and tried to rape her.

She was caught out due to the cabbie's GPS tracker.

The allegation in March 2014 led to the innocent driver being held by police for 18 hours and having to take part in intimate examinations.

Her solicitor Ian Moir withdrew from acting for her after she told social workers she had in fact not been attacked.

On Friday, Eddie Gilroy represented her when she returned to court for sentencing.

He told the court: "She indicated to me that the plea was properly tendered and she now accepts the terms of the narrative."

Jailing Scanlan for 13 months, sheriff John McCormick said it was an "anxious case" and said "to accuse someone of rape is to accuse that person of one of the most serious crimes".

He added: "To admit that the allegation was false might discourage others who have been sexually assaulted in other circumstances from coming forward."

Outside court Mr Millar said: "I'm relieved to a certain extent, personally I don't think it was long enough.

"Hopefully it will send out a message that this kind of thing can't be allowed to happen.

"Taxi drivers are vulnerable - hence the reason I got CCTV installed. To a certain extent she's put women in danger because now drivers are not wanting to pick up single, drunk females."

The court heard at an earlier hearing that Scanlan had been at a wedding at the Crutherland House Hotel in East Kilbride, South Lanarkshire, where she was described as "very drunk".

She later asked for a taxi home and it was Mr Millar who arrived. He collected her despite initially refusing to but soon into the journey, Scanlan started mouthing off at the driver.

The court was told Scanlan then ranted: "I am a nurse. You are nothing but a psycho."

The fed-up taxi driver eventually decided he wanted Scanlan out of his car.

Scanlan turned up at Cathcart Police Office and claimed she had been the victim of a sex attack in Mr Millar's car.

She went on to describe a detailed assault after the driver had apparently pulled over into "a secluded area".

Scanlan, from Rutherglen, South Lanarkshire, said Mr Millar tried to have sex with her before bizarrely dropping her off at the police station but officers were wary of "inconsistencies" in her claims.

Mr Millar was still held that morning and kept in police custody for 18 hours as he was quizzed about the accusations.

He was also made to go through a number of medical examinations. The GPS tracker in the driver's car was then checked as part of the probe.

It showed Scanlan's claim he had gone to a quiet area before attacking her was wrong.

Mr Millar was released without any charge.

Scanlan went on to be detained by police in October 2014 after she was found to be lying.

The court heard the cabbie described what happened to him as "one of the most embarrassing things in my life".

Mr Millar later begged his bosses to get a camera fitted in his vehicle to avoid similar false allegations being made in the future.

Mr Gilroy said Scanlan, now unemployed, has health problems and had lost out on work because of court proceedings.

He added: "She will almost certainly lose her nursing registration, that means losing her livelihood for the foreseeable."