A high court judge is to consider whether a legal ban on prosecuting Tony Blair over the Iraq war can be challenged.

A private criminal prosecution against the former Labour prime minister was blocked in 2016 when it was ruled Blair would have immunity from any criminal charges.

On Tuesday the high court will consider arguments for reversing that ban and for keeping it.

The attorney general, the government’s top law officer, wants the ban upheld and also to join the case.

The current controversy revolves around Blair’s decision when prime minister to take Britain into the invasion of Iraq in 2003, which was led by the United States and sparked huge opposition.

In November 2016, a British court ruled against an application to bring a private prosecution. A district judge at Westminster magistrates court ruled Blair had immunity from prosecution over the Iraq war and that any case could also “involve details being disclosed under the Official Secrets Act”.

The attempted private prosecution was brought in the name of a former top Iraqi general and sought to try Blair for the crime of aggression. On Tuesday, a more senior judge will consider whether there are sufficient grounds to grant a judicial review of the rejection of the prosecution.

The high court judge will consider the paper submissions made by lawyers and there will be no public hearing.

The high court will also consider whether Jeremy Wright QC, the attorney general, can join the case. Wright believes it is in the public interest that the private prosecution is blocked.

A spokesperson for the attorney general said of the high court proceedings: “The next stage will be the court considering the papers and making a decision on whether to grant permission for a judicial review.

“The attorney is seeking to intervene to represent the public interest.”

The private prosecution seeks the trial in a British court of Blair, the foreign secretary in 2003, Jack Straw, and Lord Goldsmith, the attorney general at the time the government was deciding to join the invasion of Iraq.

It seeks their conviction for the crime of aggression and is based on the damning findings of last year’s Chilcot report into the British decision to join the invasion of Iraq, under the false pretext that Saddam Hussein’s regime had weapons of mass destruction.

The attorney general claims the case for the crime of aggression does not exist in English law, even though it does exist in international law. But that argument appears to be undermined in a document written by Goldsmith himself.

In his 2003 memo on the legality of the Iraq war, Goldsmith, then attorney general, seemed to accept a key point of those now seeking his prosecution. “Aggression is a crime under customary international law which automatically forms part of domestic law,” he wrote.

After the Chilcot report was released some families of British service personnel who died fighting in Iraq called for Blair to face criminal charges.

The latest attempt at a private prosecution is brought by Gen Abdul-Wahid Shannan ar-Ribat, former chief of staff of the Iraqi army and now living in exile.

His application to Westminster magistrates court for a summons to be issued against Blair was refused by district judge Michael Snow, who said the former prime minister had “implied immunity as former head of state and government ministers, therefore offence not made out … Allegations involve potential details being disclosed under the Official Secrets Act for which attorney general and director of public prosecutions consent are required.”

The lawyers behind the private prosecution attempt include Michael Mansfield QC and Imran Khan, who fought a long battle for justice for the family of Stephen Lawrence.

It is not clear when the decision by the high court will be made public.