A far-right German extremist on trial for the murder of a regional politician whose death shocked Germany last year has acknowledged in court that he filed the fatal shot.

Stephan Ernst made the admission in a statement by his lawyer to the Frankfurt state court on Wednesday, news agency dpa reported. Ernst went on trial in mid-June for the killing of Walter Luebcke, who led the regional administration in the Kassel area of central Germany.

Luebcke, a member of Chancellor Angela Merkel’s party, was shot on his porch on June 1, 2019, and died later that night.

Stephan Ernst, who is accused of murdering politician Walter Luebcke for his trial at the Oberlandesgericht Frankfurt courthouse, in Frankfurt, Germany, Wednesday, August 5, 2020. Stephan Ernst acknowledged that he filed the fatal shot in a statement by his lawyer to the Frankfurt state court on Wednesday, news agency dpa reported. (Kai PfaffenbachPool via AP)

Stephan Ernst, who is accused of murdering politician Walter Luebcke for his trial at the Oberlandesgericht Frankfurt courthouse, in Frankfurt, Germany, Wednesday, August 5, 2020. Stephan Ernst acknowledged that he filed the fatal shot in a statement by his lawyer to the Frankfurt state court on Wednesday, news agency dpa reported. (Kai PfaffenbachPool via AP)

Ernst, 46, who has previous convictions for violent anti-migrant crimes, is accused of murder, attempted murder, serious bodily harm and firearms offenses. There are no formal pleas in the German legal system.

A second man, identified only as Markus H. because of privacy rules, is charged with being an accessory to murder and breaking firearms laws.

Prosecutors say Ernst and Markus H. both attended an October 2015 town hall event where Luebcke defended the German government’s decision to allow hundreds of thousands of refugees into the country. A video of Luebcke’s remarks was widely shared in far-right circles, drawing numerous threats.

Stephan Ernst, who is accused of murdering politician Walter Luebcke, takes off his face mask at his trial at the Oberlandesgericht Frankfurt courthouse, in Frankfurt, Germany, Wednesday, August 5, 2020. Stephan Ernst acknowledged that he filed the fatal shot in a statement by his lawyer to the Frankfurt state court on Wednesday, news agency dpa reported. (Kai PfaffenbachPool via AP)

Stephan Ernst, who is accused of murdering politician Walter Luebcke, takes off his face mask at his trial at the Oberlandesgericht Frankfurt courthouse, in Frankfurt, Germany, Wednesday, August 5, 2020. Stephan Ernst acknowledged that he filed the fatal shot in a statement by his lawyer to the Frankfurt state court on Wednesday, news agency dpa reported. (Kai PfaffenbachPool via AP)

Ernst initially told investigators he carried out the killing alone, but later retracted the statement and portrayed Luebcke's death as an accident. The court has seen videos of both versions.

The German government vowed to crack down on far-right extremism following the Luebcke killing and other attacks last year, warning that it posed a significant security threat in the country.