BERLIN (AP) — A German man was convicted of murder and given a life sentence on Tuesday for fatally shooting a young gas station clerk following a dispute over face masks.

The killing in the western town of Idar-Oberstein on Sept. 18 last year shocked the country. The 50-year-old defendant also was convicted of illegal weapons possession because he didn’t have a license for the gun used in the killing, German news agency dpa reported.

Authorities have said the man told officers he acted “out of anger” after being refused service by the 20-year-old clerk for not wearing a mask while trying to buy beer at the gas station. A requirement to wear masks in stores was among the measures in place in Germany at the time to stop the spread of COVID-19.

Police said the suspect, a German citizen identified in local media as Mario N., left the gas station after the dispute but returned a half-hour later and shot the clerk in the head.

He initially fled the scene but turned himself in to police after a large-scale manhunt was launched.

Defense lawyers in the trial at the state court in Bad Kreuznach, which lasted for six months, had sought a conviction for manslaughter. They argued that there were limits to how far the suspect, who according to an expert was intoxicated at the time of the fatal shot, could be held criminally responsible for his actions.

Prosecutors had called for the court to find the defendant “seriously culpable,” which would have effectively barred him from the early release after 15 years that is typical for people in Germany given life sentences. Judges didn’t do so.