A man shed tears when he was formally cleared of stalking his ex-girlfriend after a video filmed on his phone helped to "undermine" her accusations.
Lloyd Fitchie, from Whitstable, had been arrested and charged with harassing the woman over a four-week period following an acrimonious break-up.
It was alleged he had driven past her home near Canterbury on several occasions and turned up unannounced in the early hours.
The 39-year-old was also said to have sent numerous abusive messages to his former partner and even told her he had put her on a "murder list".
However, Canterbury Crown Court heard Mr Fitchie had in fact filmed the conversation on his phone and, once the footage was reviewed by the Crown Prosecution Service together with screenshots of messages he had also provided, they decided on February 2 to offer no evidence.
He was visibly upset as proceedings against him were finally brought to an end after more than two years.
On two previous occasions the judge herself had expressed concerns about the prosecution case and whether Mr Fitchie had been given proper legal advice when he appeared before magistrates.
The court heard he was charged with stalking causing serious alarm or distress between December 21, 2021, and January 26, 2022.
He originally pleaded not guilty in February last year but, on the day he was due to stand trial at Margate Magistrates' Court five months later, he admitted the offence.
Sentencing was therefore adjourned for reports before being committed to the crown court.
However, at a hearing in December last year, Judge Alison Russell was informed of the new evidence that had surfaced and was described as "putting a different spin" on matters.
The prosecutor on that occasion told the court the screenshots provided by Mr Fitchie showed the messages the complainant had given to police were "clearly incomplete".
"When one looks at the full exchange, it sheds quite a different light on proceedings," said Kieran Brand.
"She describes perhaps a more disturbing incident than perhaps the footage shows."
At a further hearing last month, Judge Russell also questioned whether the conduct that was accepted by the prosecution - turning up in his car outside her home on just one occasion, contacting her friends and family, and returning £40 she claimed he had stolen - had even amounted to serious alarm or distress as charged.
Proceedings were then adjourned for a second time so the CPS could review all matters, as well as any application by Mr Fitchie, of Lismore Road, to vacate his guilty plea.
Having finally returned to court last week, defence barrister James Harrison confirmed his client now wanted to deny the charge.
He told the court that the two "principle" reasons were concerns over the legal advice he had been given in the lower court as well as the new material.
"A number of pieces of evidence including video footage were served and undermined the credibility of the complainant and, therefore, her assertion of the serious alarm and distress she suffered," explained Mr Harrison.
It was also confirmed that there was no evidence to support the alleged 'murder list' threat.
With the application to vacate his plea unopposed by the CPS and allowed by Judge Russell, the prosecution offered no evidence and a formal not guilty verdict was entered into the court record.
It was said Mr Fitchie's relationship with his former partner had come to "a rather unhappy and unsatisfactory" end, and messages later supplied to police by the complainant "suggested he had behaved in an aggressive and inappropriate way".
The alleged victim also referred in her statement to the "significant impact" Mr Fitchie's alleged conduct had had.
However, having described the prosecution evidence at that stage as "one-sided", Judge Russell told the court that material subsequently handed over by Mr Fitchie portrayed "a quite different picture".
"It is clear the defendant was not behaving in the aggressive manner that had been suggested, and indeed the conduct of the complainant and the defendant was somewhat different to that initially indicated in the course of the Crown's prosecution," said the judge.
She further stated that she had previously expressed "serious concerns" about the ex-girlfriend's credibility, and added that it would be "nigh on impossible" to establish that Mr Fitchie's conduct had caused serious alarm or distress.
She therefore ruled it would be "unjust" and not in the interests of justice for the case against him to continue.
However, on imposing what is known as a non-conviction restraining order on Mr Fitchie for five years, the judge warned him: "Learn your lesson, stay away and don't find yourself in the crown court again."
Mr Fitchie, whose only previous conviction is for fare-dodging, thanked the judge as he left the dock.