Two Associated Press journalists in Afghanistan were shot by an Afghan official, the AP said on Friday. One of the shootings was fatal.

German photographer Anja Niedringhaus, who lost her life, and Canadian reporter Kathy Gannon were traveling in an Afghan National Army-protected convoy delivering election ballots in the country's eastern Khost province, CNN reported.

A unit commander walked up to the victims' vehicle and open fired, killing Niedringhaus. Gannon received medical treatment and is in stable condition, CNN reported.

"Anja and Kathy together have spent years together in Afghanistan covering the conflict and the people there," AP executive editor Kathleen Carroll said from New York, CNN reported. "Anja was a vibrant, dynamic journalist well-loved for her insightful photographs, her warm heart and joy for life. We are heartbroken at her loss."

Niedringhaus, 48, was an internationally known photographer who was "spirited, intrepid and fearless, with a raucous laugh that we will always remember," AP chief executive Gary Pruitt said, CNN reported.

The two journalists were part of a convoy of election workers delivering ballots ahead of Afghanistan's upcoming presidential and provincial elections.

The unit commander yelled the words "Allahu akbar," which means "God is great," before shooting at Niedringhaus and Gannon in the car's backseat, according to CNN. The gunman then turned himself over to police on the scene.

Baryalay Rawan, spokesman for the Khost provincial governor, told CNN the suspect was arrested and police are investigating. The motive for the shooting is not yet known.

Afghan President Hamid Karzai is expected to leave his position after the democratic elections are held. The Taliban, whose control over the country ended in 2001, have threatened retaliation against anyone involved in the elections, CNN reported.

There have also been several other attacks ahead of the elections, including a suicide bombing on Wednesday that killed six Afghan police officers at the Interior Ministry in the capital Kabul.