Federal investigators said 45-year-old Stephan Ernst drove to Walter Lübcke's house in Wolfhagen, in the state of Hesse in central Germany, on the evening of June 1st, 2019.
He crept up under cover of darkness to the terrace where Lübcke sat before shooting him in the head with a revolver.
Ernst's “racism and xenophobia founded on an ethnic-nationalist attitude were decisive in the act”, prosecutors said in a statement.
The suspect and his fellow accused, identified only as Markus H., had attended a political meeting in October 2015 where Lübcke argued in favour of accommodating refugees in the town of Lohfelden.
Ernst “from the time of the meeting increasingly projected his xenophobia onto Dr Walter Lübcke,” a regional politician from Chancellor Angela Merkel's centre-right CDU party, prosecutors said.
Following mass sexual assaults by migrants against women in Cologne on New Year's Eve 2015 and a July 2016 terror attack in French city Nice, Ernst began spying on Lübcke in preparation for the murder, travelling repeatedly to the politician's house to make his plans.
Meanwhile, fellow defendant Markus H., who is charged with complicity in the murder, helped Ernst train with firearms in forests and at gun clubs between 2016 and 2018, “including with the murder weapon”.
Walter Lübcke was shot to the head. Photo: DPA
Ernst had already inflicted “serious wounds” to the chest and spine of an Iraqi asylum-seeker living in Lohfelden in a January 2016 knife attack that left the victim in intensive care.
At the time of his June 2019 arrest, the main suspect in Lübcke's killing held “several firearms and ammunition that he had acquired illegally”, prosecutors said, including three revolvers, two automatic pistols, two rifles, 1,400 rounds of ammunition and a submachine gun.
Arrested soon afterwards, H. was found to be in possession of a deactivated submachine gun.
After the arrests, Ernst had initially confessed to Lübcke's murder, but in January this year he retracted the admission and said H. had shot the politician.
But prosecutors remain convinced that while H. “accepted and supported” the danger Ernst posed, he “was not familiar with the actual plans for the attack”.
The killing was followed by an October attack on a synagogue in eastern city Halle that left two dead, while a gunman shot dead nine people of migrant backgrounds in central town Hanau in February.
Perpetrators in both attacks posted racist screeds online, and Interior Minister Horst Seehofer has since declared far-right extremism the “biggest security threat facing Germany”, promising a beefed-up security response.