The commission handed out a warning to the IEA in February over the publication of a report about Brexit.

The regulator said at the time that the publication in 2018 of Plan A+: Creating a Prosperous Post-Brexit UK amounted to misconduct and mismanagement by the charity’s trustees because the report was insufficiently balanced and a launch event included only those speakers who "held a particular set of views".

The warning said the charity’s trustees had to provide the regulator with written assurances that it would not engage in campaigning or political activity that contravened legal or regulatory requirements.

But the commission said today that, after a review by one of its board members, it had concluded that although it was correct to issue the warning its handling of the case was "not as good as it should have been".

A spokeswoman for the regulator said: "I can confirm that the official warning against the IEA has been withdrawn with immediate effect.

"A report published by the charity in September 2018 crossed the line and represented a breach of charity law.

"A review undertaken by a commission board member found that the charity has taken remedial action in relation to the breach and that our handling of the charity at the time of issuing the official warning was not as good as it should have been.

"On that basis, we have determined that it is proportionate to withdraw the warning now."

She said the review accepted that the official warning did not, for example, reflect that at the point of issuing the warning the offending report had already been removed from the charity’s website.

She added that the commission was able to annul a warning if it was made in error, but that was not what had happened in this case.

The regulator said it had closed a compliance case about the charity in early June because the charity had made progress "on matters relating to the official warning".

Neil Record, chair of the IEA, said: "The Institute of Economic Affairs is delighted that the Charity Commission has decided to withdraw the official warning with immediate effect.

"I am greatly looking forward to working with the Charity Commission in the months and years ahead."