The German state of Hesse has voted to finally scrap the death penalty from its constitution, amending a 69-year-old legal anomaly which allowed it.

The western state is the last in Germany to amend its local legal code, after the national constitution abolished capital punishment in 1949.

Some 83% of voters were in favour of changing the 1946 provision, referendum results on Thursday showed.

The vote is a symbolic one, as federal laws have always trumped state ones.

Between 1946 and 1949, two people were sentenced to death in the state, but the rulings were later commuted to life sentences.

Capital punishment is banned in all EU countries, so this lingering quirk was seen as an embarrassment to Germany, an outspoken opponent of the practice.

The referendum, which took place on Sunday, coincided with a regional vote which saw heavy losses for Chancellor Angela Merkel's CDU party.

On Monday, she announced she would quit as party leader and step down as German chancellor in 2021.

How did the law last so long?
Germany abolished the death penalty with its Basic Law of 1949, but the state of Hesse's constitution predated this.

Other states introduced local bans in line with national law, but wealthy Hesse, home to financial hub Frankfurt, was the last to do so.

"Partly it was never modernised because it wasn't necessary - the Basic Law overrules state constitutions," local politician Juergen Banzer said, according to Reuters.

A second reason was that Hesse is the only state that can change its state constitution - the oldest in modern Germany - through a people's vote.

"There was a fear that if a terrible crime was committed just as Hesse voted on whether to abolish the death penalty, then the vote could go the wrong way," Mr Banzer said.

Voters had 15 amendments to consider on Sunday, including statements on children's rights, sex equality, European unity and environmental sustainability.