BERLIN — An avowed neo-Nazi has admitted to the murder this month of a member of Chancellor Angela Merkel’s center-right party, Walter Lübcke, who had defended her decision to accept refugees into Germany.

The 45-year-old suspect, identified by officials only as Stephen E. because of German privacy laws, confessed on Tuesday, Peter Frank, the country’s federal prosecutor, said on Wednesday.

“He claims to have planned and carried out the murder of Mr. Lübcke alone,” Mr. Frank said. But he added that his office would continue to investigate the possibility that the suspect had had help.

“Likewise, our investigation will continue to focus on whether that act, or murder, is based on a terrorist organization or whether the accused is a member of a right-wing terrorist group,” Mr. Frank said.