KABUL (Reuters) - An Afghan police officer who shot and killed a veteran Associated Press photographer during the country’s 2014 presidential election has been sentenced to 20 years in prison, a Supreme Court official told Reuters on Sunday.

The official spoke on condition of anonymity because he was not authorized to give statements to the press.

A second AP reporter was injured in the attack, which took place in eastern Khost province while they were sitting in their car inside a government compound.

Anja Niedringhaus, 48, a German national, was killed instantly while Canadian reporter Kathy Gannon who had covered conflict in Afghanistan for 30 years survived the shooting.

The police officer had initially been sentenced to death, but that decision was overturned by an appeals court and the Supreme Court upheld that ruling, the court official said.