A German prison officer has admitted leaking the arrest warrant issued for an Iraqi suspect in connection with a fatal stabbing on Sunday.

The document was spread online by right-wing groups who then held anti-immigrant rallies in the eastern city of Chemnitz.

The officer has been suspended and may now face criminal charges.

He leaked the documents because he wanted to "end speculation" about the stabbing, his lawyer said.

Police were braced for more trouble in Chemnitz on Thursday evening, but a protest passed without any major incident.

Following Sunday's stabbing, police had arrested a 22-year-old Iraqi man and a 23-year-old Syrian and charged them with manslaughter.

Authorities launched an investigation after the arrest warrant for the Iraqi was published on far-right websites.

It revealed details of the number of stab wounds as well as the full names of suspects, the victim, witnesses and the judge. It also contained the Iraqi's address.

Saxony's justice minister, Sebastian Gemkow, called the leak "irresponsible" and said it was "likely to complicate the ongoing investigation and prosecution".

Who is the prison officer?
The 39-year-old guard, who handed himself in, worked at a correctional facility in the eastern city of Dresden, Deutsche Welle reported.

According to a statement published on Facebook by the man's lawyer, he said he knew he would probably lose his job but hadn't realised at the time that publication of the warrant was illegal.

He said he had wanted "to put an end to speculation about the sequence of events in the crime".

What happened in Chemnitz?
In the early hours of Sunday, a fight broke out between "multiple nationalities" on the sidelines of a street festival, police said.

The stabbing victim, a 35-year-old German-Cuban carpenter named Daniel H, was critically wounded and died in hospital. Two other people were injured.

It remains unclear what triggered the brawl, but police dismissed rumours that the victim had been defending a woman from sexual assault.

News of the incident involving migrants incited hundreds and then thousands of right-wing extremists and sympathisers to take to the streets on Sunday night.

On Monday, about 6,000 took part in another far-right demonstration, while 1,000 people gathered in a rival anti-fascist rally, police said. Fireworks and objects were hurled on both sides and several people were injured.

The leak of the arrest warrant further fuelled tensions.

Some far-right protesters were arrested for making the illegal Hitler salute.

How has the government reacted?
German Chancellor Angela Merkel has repeatedly condemned the far-right protests. "Hate in the streets has nothing to do with our constitutional state," she said.

Michael Kretschmer, the premier of Saxony and a close ally of Mrs Merkel, has vowed to deal firmly with extremists.

"The fact that we have a Syrian and an Iraqi suspect is no reason - no reason at all - for a general suspicion of all foreign residents," he said.

The protests have exposed divisions in German society following Mrs Merkel's decision in 2015 to allow more than one million migrants into the country.

Since then, the number of people seeking asylum has fallen steeply. Nonetheless, right-wing groups such as the AfD - which entered parliament for the first time in 2017 with 12.6% of the vote and 94 seats - deplore Mrs Merkel's liberal immigration policy.