The UK legislation proposes immunity from prosecution for British soldiers and security personnel from the time of 'The Troubles' in Northern Ireland. AFP

Ireland announced legal action Wednesday against the UK government in the European Court of Human Rights over a law granting immunity to combatants in the Northern Ireland conflict.

The contentious legislation, passed by the UK parliament in September, creates a truth and recovery commission offering amnesty to British security personnel and paramilitaries if they cooperate with its enquiries.

It has been condemned by families of those who died during the three decades of violence over British rule in Northern Ireland, known as "the Troubles", that began in the late 1960s.

All Northern Irish political parties and the Irish government in Dublin oppose the legislation, while Europe's leading rights watchdog, the Council of Europe, has also expressed "serious concerns".

Deputy Prime Minister Micheal Martin said Ireland had consistently argued the legislation is "not compatible" with Britain's obligations under the European Convention on Human Rights (ECHR).

"The decision by the British government... (to) pursue legislation unilaterally, without effective engagement with the legitimate concerns that we, and many others, raised left us with few options," he said.

"The British government removed the political option, and has left us only this legal avenue."

Martin added he had "used every opportunity to make my concerns known" and urged London to pause the legislation.

Taoiseach (prime minister) Leo Varadkar told reporters in Dublin that the court would be asked to carry out a judicial review of the legislation.

"We informed the British government of that this morning."

Ireland will pursue the case in the European Court of Human Rights in Strasbourg, which oversees the ECHR and is recognised by 46 states including Britain and Ireland.

Martin noted incorporating the convention into Northern Ireland law was a "specific and fundamental requirement" of the 1998 Good Friday peace accords.

That largely ended the Troubles, which saw more than 3,500 people killed.

Around 1,200 deaths from that time remain under investigation, according to the UK government.

Its law -- formally called the UK Northern Ireland Troubles (Legacy and Reconciliation) Act 2023 -- has been welcomed by groups representing British veterans from the period.

They argue former soldiers have been subjected to unfair prosecutions.

Last year British soldier David Holden received a three-year suspended sentence for killing a man at a checkpoint in 1988, shooting him in the back.

Last week, a judge in Northern Ireland said "Soldier F" -- the only British soldier charged over the 1972 Bloody Sunday killings of 13 civilians -- would stand trial for murder.

But Ireland's legal action will likely prove contentious in Britain, where the ECHR is increasingly attacked by right-wing elements within the ruling Conservatives.

They want Prime Minister Rishi Sunak to withdraw the country from the convention over protections it offers to refugees and asylum-seekers arriving in the UK.

The UK government's Northern Ireland Office said it "profoundly regrets" the Irish government's decision to "bring this unnecessary case against the UK".

"The decision comes at a particularly sensitive time in Northern Ireland," Northern Ireland Secretary Chris Heaton-Harris said in a statement.

"It did not need to be taken now, given the issues are already before the UK courts."

Heaton-Harris said the UK government would "continue robustly" to defend the legislation.

"The overriding purpose of the Legacy Act is to enable more victims and survivors to obtain more information faster than can be achieved under current legacy mechanisms," he said.

"We cannot afford further delay in the provision of effective legacy outcomes -- both for families and wider society."