The attorney general will be asked to approve warrants before suspected war criminals can be arrested in future under a plan being negotiated by the Foreign Office in response to the row over attempts to arrest Israel's former foreign minister.

The Guardian has learned that discussions have begun in Whitehall on creating "safeguards" in criminal cases against visiting foreign leaders – not just those from Israel. Lawyers involved said they were outraged by the proposed change.

Gordon Brown today threw his weight behind moves to change the law and telephoned Tzipi Livni, leader of the Israeli opposition, to say he "completely opposed" the warrant issued by a London magistrates court for her arrest for alleged crimes in relation to the war in Gaza. The warrant was withdrawn when it transpired that Livni was not in the UK, but triggered a huge diplomatic spat in which politics clashed head-on with the law.

David Miliband, the foreign secretary, also phoned Livni, and called his Israeli counterpart, Avigdor Lieberman, to apologise.

"Livni supports a two-state solution. This attempt to secure her arrest has really set alarm bells ringing," said a senior Foreign Office source. "No one is talking about removing universal jurisdiction, but it's an anomaly that a magistrates court can issue an arrest warrant before a prosecutor has even said there is a case to prosecute. There need to be safeguards."

News of the prime minister's intervention provoked a furious response from lawyers and pro-Palestinian groups.

"I feel honest revulsion at the idea of a case where a judge has granted an arrest warrant and a politician gets on the phone and apologises," said Daniel Machover, a solicitor. "They have got to stay out of individual cases and legal decisions."

The law has developed rapidly since the Pinochet case in 1999, and allows suspected perpetrators of crimes such as genocide, torture and war crimes to be prosecuted in the courts of countries other than that where they were committed.

"The Geneva Conventions Act of 1957 places a positive obligation on the UK to pursue those who are alleged to have committed grave offences under the act," said another lawyer. "In the light of the Goldstone report [into the Gaza war] there is a prima facie case to answer."

The only successful prosecution so far has been of an Afghan warlord convicted of torture in 2005.

News of a plan to involve the attorney general in issuing warrants brought complaints about selective application of the law, politicisation of criminal justice, and violation of the separation of powers.

"It's outrageous and the only reason the Foreign Office wants to do it is to avoid embarrassment – there is no good legal reason," said Machover. "If there was an arrest warrant against Livni, it's because there was a case to answer according to a judge who found that there was reasonable suspicion."

Livni was due to attend a conference in London but cancelled two weeks ago. Palestinian sources claimed to have seen her at the event and alerted the lawyers seeking the arrest warrant.

Palestinians and an Israeli rights organisation say 1,400 people, mostly civilians, were killed in the Gaza offensive. Israel said 1,166 Palestinians died, mostly combatants, and it acted in self-defence against Hamas rockets fired from Gaza. Thirteen Israelis died.