A judge has blocked the Trump administration’s attempt to resume federal death penalties after ruling it broke the law.

The decision late on Wednesday, by US district judge Tanya Chutkan, halted four executions scheduled for December and January.

The District of Columbia judge, appointed by former president Barack Obama, found that US attorney general William Barr’s directive to execute the men using the same type of lethal injection contravened the Federal Death Penalty Act.

They would have been the first federal executions in 16 years.

"Plaintiffs have clearly shown that, absent injunctive relief, they will suffer the irreparable harm of being executed under a potentially unlawful procedure before their claims can be fully adjudicated," Judge Chutkan wrote.

Mr Barr announced in July that the death penalty would be re-implemented in order to bring justice to the families of victims of the death row inmates, who all have been convicted of murder.

Among them is a white supremacist who killed a family of three, a man who dismembered a 16-year-old girl before killing an 80-year-old with a claw hammer, and a man who shot and killed five people.

“Congress has expressly authorised the death penalty through legislation adopted by the people’s representatives in both houses of Congress and signed by the president,” Mr Barr said in a statement.

Historian predicts Trump impeachment is 'inevitable'

Under Mr Barr's plan, executions would have been carried out by lethal injection using a single drug, pentobarbital, rather than using a standard three-drug cocktail. The Obama administration said in 2011 it would not carry out executions because of a lack of access to the drugs.

But Judge Chutkin said the uniform federal policy was against the death penalty act's requirement that prisoners be killed "in the manner prescribed by the state of conviction".

The vast majority of death penalties carried out in the US are conducted at the state level. Just three executions at the federal level have been carried out in the modern era, with the most recent occurring in Texas in 2003 with the killing of Louis Jones Jr, who raped and murdered Army soldier Tracie Joy McBride.

Minneapolis protesters clash with police outside Trump rally Show all 12 1 /12 Minneapolis protesters clash with police outside Trump rally Minneapolis protesters clash with police outside Trump rally IMAGES INCLUDE EXPLICIT LANGUAGE: Counter protesters confront horse-mounted law enforcement after a rally by U.S. President Donald Trump in Minneapolis, Minnesota. Reuters Minneapolis protesters clash with police outside Trump rally Anti-Trump protesters hold signs outside the Target Center in Minneapolis, Minnesota, ahead of a "Keep America Great" rally AFP/Getty Minneapolis protesters clash with police outside Trump rally A counter protester holds a sign before a rally by U.S. President Donald Trump in Minneapolis Reuters Minneapolis protesters clash with police outside Trump rally The state is home to some of the President’s most prominent critics – including senator Amy Klobuchar and congresswoman Ilhan Omar AFP/Getty Minneapolis protesters clash with police outside Trump rally Both the president’s backers and his detractors were, for the most part, kept separate EPA Minneapolis protesters clash with police outside Trump rally On the fringes of the action the president’s supporters clashed with protestors AP Minneapolis protesters clash with police outside Trump rally A protester with a whistle attempts to interrupt U.S. President Donald Trump while he spoke Getty Minneapolis protesters clash with police outside Trump rally Minneapolis Police create a blockade to hold back protestors Getty Minneapolis protesters clash with police outside Trump rally On the arrival of the police protestors could be seen jeering and hurling projectiles at officers AP Minneapolis protesters clash with police outside Trump rally Officers deployed pepper spray during the protests AP Minneapolis protesters clash with police outside Trump rally Baby Trump balloons are carried by a counter protester before the rally Reuters Minneapolis protesters clash with police outside Trump rally Anti-Trump protesters hold signs outside the Target Center in Minneapolis, Minnesota AFP/Getty

Across the US, there are 29 states that have authorised the punishment, while a growing number of states have acted to abolish the measure.

Among the states which still have capital punishment are California, Texas, Arizona, Florida, and Oregon. New York, Alaska, Washington and Illinois.