A 165-year-old law that threatens anyone calling for the abolition of the monarchy with life imprisonment is technically still in force – after the Ministry of Justice admitted wrongly announcing that it had been repealed.

The Treason Felony Act 1848 has been the subject of repeated legal confusion this century. It was the subject of a high court challenge by the Guardian in 2003. This week, in a footnote to a list of new offences, the MoJ said the powers in section 3 of the Act had finally been swept away in a belated, legislative pruning of unwanted laws.

The act – which makes it a criminal offence, punishable by life imprisonment, to advocate abolition of the monarchy in print, even by peaceful means – has not been deployed in a prosecution since 1879.

The Ministry of Justice said: "Section 3 of the Treason Felony Act 1848 has not been repealed. The Ministry of Justice has removed this publication and is reviewing its contents."

That means in theory that to "imagine" overthrowing the Crown or waging war against the Queen, as the wording of the act describes, could still result in a life sentence.

In 2001, the Guardian, which had launched a campaign for the establishment of a republic, initiated a legal challenge against the antique statute on the grounds that it prevented freedom of expression as guaranteed by the Human Rights Act 1998.

The law lords dismissed the newspaper's case on the grounds that it was unnecessary .

Lord Steyn explained: "The part of section 3 of the 1848 Act which appears to criminalise the advocacy of republicanism is a relic of a bygone age, and does not fit into the fabric of our modern legal system. The idea that s3 could survive scrutiny under the Human Rights Act is unreal." But, he added, courts should not be used as "an instrument … [to] chivvy parliament into spring-cleaning the statute book".

Among 327 offences that have recently been purged from the statute book was that of "being an incorrigible rogue", under the Vagrancy Act 1824.