Edinburgh Sheriff Court heard how Chantal Clark claimed she had been raped. Picture: Greg Macvean

Chantal Clark, 36, caused police to launch a major inquiry after claiming she had been sexually assaulted by the cabbie in Midlothian in May 2014.

She actually had consensual sex with the driver, who cannot be named for legal reasons.

Edinburgh Sheriff Court heard how the subsequent probe resulted in the man appearing in court on a rape charge.

Sign up to our daily newsletter The i newsletter cut through the noise Sign up Thanks for signing up! Sorry, there seem to be some issues. Please try again later. Submitting...

The inquiry also cost the taxpayer thousands of pounds before it ended with Clark’s admission that she had lied to officers.

On Tuesday, Sheriff Alistair Noble ordered Clark to perform 200 hours community service.

Sheriff Noble told Clark that cases of this type usually resulted in custodial sentences being imposed.

However, she escaped prison because she was a first offender who pleaded guilty to the charge she was facing at her earliest court appearance.

Passing sentence, Sheriff Noble said: “I am obliged to take these factors into account. You will perform 200 hours of unpaid work in the community.”

The story emerged last month after Clark, of Dalkeith, Midlothian, pleaded guilty to a charge of falsely making a rape claim before Sheriff Noble.

Depute procurator fiscal Brent Bissett told the court that Clark had sex with the man after he picked her up in his taxi at 3.20am on May 11 2014.

The supposed sexual assault took place somewhere in Midlothian.

When she got home to Dalkeith, Midlothian, she told her husband that the driver had sexually assaulted her.

Detectives were then contacted and Clark told them untruths about what had happened.

Mr Bissett said detectives then tracked the man down and took him into custody.

He added: “The police arrested the man and charged him with rape. He appeared in court the following day.”

Clark then contacted the police to retract her confession the day after the alleged attack.

However, the court heard that specialist rape investigation officers were unable to speak to her for another few days.

The court heard that the police didn’t have the resources to speak to her straightaway.

When CID officers finally contacted Clark, she told them that she had made the story up.

Mr Bissett added: “She admitted to officers that she had been lying and that the sexual intercourse had been consensual. She told officers that she wished to retract her confession.

“She told officers that she had felt awful about what she had done and wished to apologise to everybody concerned.”

Police then arrested and charged Clark with making a false allegation and preventing the police from investigating actual crime.

The procurator fiscal in Edinburgh then stopped the case against the taxi driver, marking the case against him as ‘no proceedings’.

Mr Bissett told the court: “He has said that there have been issues with regards to his marriage and business issues with regards to his taxi licence.”

The court heard that she told police officers: “I feel so ashamed. I have been unable to sleep or eat.

“I want to apologise for the problems I have caused.”

Clark wept and blew her nose with a hanky as defence solicitor advocate Andrew Houston addressed the court on her behalf.

Mr Houston said the matter had ‘snowballed’ out of her control but that she had attempted to make amends.

He said that Clark had been crying when her husband suddenly asked her whether she had been raped.

She had replied yes but she contacted police once she realised what she had done.

The court heard that the cost of the investigation into the fake rape claim had amounted to an estimated cost of £3,000 to the taxpayer.

On Tuesday, Mr Houston told the court that Clark was ashamed of her conduct and had fully co-operated with the authorities.

He added: “There has been an unequivocal acknowledgement on the part of Mrs Clark that she had lied to the police.

“Mrs Clark is fortunate in that she has a tremendously supportive husband. She has taken steps to address her use of alcohol and she has made use of medical services to address her psychological needs.