LONDON — An alleged member of a banned British neo-Nazi group pleaded guilty Tuesday to planning to murder a lawmaker.

Jack Renshaw, 23, is accused of buying a machete to kill Labour Party legislator Rosie Cooper last year.

Renshaw pleaded guilty to preparing acts of terrorism as he went on trial alongside five other alleged members of the outlawed group National Action. All six deny belonging to the group.

Prosecutors say Renshaw planned to kill both Cooper and a police officer who had previously interviewed him about alleged race-hate offenses.

Prosecutor Duncan Atkinson said Renshaw’s goal was “to kill for National Action and White Jihad,” and to “revenge himself on those he considered to be persecuting him.”

Prosecutors said the plot was approved by National Action, but foiled when a disenchanted member of the group reported it to an anti-racism organization.

The British government banned National Action in 2016, describing it as a “virulently racist, anti-Semitic and homophobic” neo-Nazi organization. The group had praised Thomas Mair, a far-right extremist who murdered Labour Party lawmaker Jo Cox in 2016.