The High Court has thrown out an attempt to prosecute Boris Johnson over claims he lied during the 2016 referendum campaign by saying the UK gave the EU £350m a week.
The Tory leadership candidate challenged a summons for him to attend court on three claims of misconduct in public office.
His lawyers said he denied acting improperly or dishonestly.
Campaigner Marcus Ball launched the private prosecution.
This happened after he crowdfunded more than £300,000 for the case.
Mr Johnson, a former Foreign Secretary, was handed a summons to attend Westminster Magistrates’ Court on 29 May.
But at a High Court hearing in London, Lady Justice Rafferty and Mr Justice Supperstone overturned this decision.
Addressing Mr Johnson’s barrister, Adrian Darbishire QC, Lady Justice Rafferty said: “We are persuaded, Mr Darbishire, so you succeed, and the relief that we grant is the quashing of the summonses.”
Reasons for the High Court’s ruling will be given at a later date.
Mr Ball’s lawyers first lodged an application in February to summons Mr Johnson, claiming that, while an MP and mayor of London, he had deliberately misled the public during the 2016 EU referendum campaign, and had repeated the statement during the 2017 general election.
The £350m figure was used by the pro-Brexit Vote Leave group throughout the referendum. It also appeared on the side of the campaign bus, which urged the UK to “fund our NHS instead”.
Mr Darbishire said the attempt to prosecute Mr Johnson was “politically motivated and vexatious”.
BBC legal affairs correspondent Clive Coleman said Mr Johnson’s lawyers had sought to say the district judge who issued the summons got the law wrong.
The Uxbridge and South Ruislip MP’s legal team argued that the offence of misconduct in public office was about the secret abuse of power and there was nothing secret about Mr Johnson’s claim, which they said had been challenged during the campaign.
Mr Johnson did not appear at the High Court hearing and a spokesman said he would not be commenting on the case.
Speaking outside court, Mr Ball said he had spent more than the £300,000 he raised on the case, leaving him in “massive debt”.
He added: “We have to wait and see the reasons for [the judges’] decision. When we have those reasons I’m going to make a decision as to what to do next.”