Photographer Anja Niedringhaus is killed and another wounded after attack in Khost province on eve of presidential election

An Afghan police officer has shot dead a foreign photographer and badly injured another in the country's violent east, as they were covering preparations for the country's presidential election.

The man opened fire on Anja Niedringhaus and Kathy Gannon from the Associated Press in a police headquarters in Khost province, after the women arrived with a convoy of election materials on Friday.

Niedringhaus died almost immediately from wounds to her head, a health official said, and Gannon was taken to hospital with less serious injuries after being shot twice. She later underwent surgery and was described as being in stable condition and talking to medical personnel. Both were veteran correspondents with long experience covering Afghanistan.

AP journalist Kathy Gannon sits with girls at a school in Kandahar, Afghanistan, in 2011. The photo was taken by Niedringhaus

It was the third attack on journalists in Afghanistan in less than a month. The Swedish-British radio reporter Nils Horner was killed in downtown Kabul on 11 March. Less than two weeks later the leading Afghan reporter Ahmad Sardar was gunned down with his wife and two children at a Kabul hotel where they had gone to celebrate the Persian new year.

The AP journalists had travelled to Tani district as part of a government convoy from the provincial capital, but in their own car. They were waiting in the vehicle at the entrance to the police compound when a police lieutenant named as Naquibullah came over and opened fire on them. No one else was injured.

A photograph taken by Niedringhaus of Afghan men loading a truck with election materials to be delivered to polling centres in Khost province. Photograph: AP

"He has been arrested and is under investigation," said a spokesman for the provincial governor Mubarez Zadran.

The assailant was from another part of Afghanistan and had been working in Khost province for about a year, he said.

A Taliban spokesman said the insurgent group was not involved in the attack. "This appears to be a private issue. It has no connection with the Taliban and we are not claiming responsibility for it," Zabihullah Mujahid told the Guardian.

The AP paid tribute to both journalists. "Anja and Kathy together have spent years in Afghanistan covering the conflict and the people there. 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," said the executive editor Kathleen Carroll, from New York.

In a memo to AP staff, AP President Gary Pruitt remembered Niedringhaus as "spirited, intrepid and fearless, with a raucous laugh that we will always remember."

"Anja is the 32nd AP staffer to give their life in pursuit of the news since AP was founded in 1846," he wrote. "This is a profession of the brave and the passionate, those committed to the mission of bringing to the world information that is fair, accurate and important. Anja Niedringhaus met that definition in every way."

Afghan President Hamid Karzai expressed his deep sadness over Niedringhaus' death and the wounding of Gannon.

Niedringhaus, who also covered sports events around the globe, received numerous awards for her works. She was part of an AP team that won the 2005 Pulitzer Prize in breaking news photography for coverage of the war in Iraq, and was awarded the Courage in Journalism Award from the International Women's Media Foundation. She joined the AP in 2002 and had since been based in Geneva, Switzerland. From 2006 to 2007, she was awarded a Nieman Fellowship in journalism at Harvard University.

Niedringhaus started her career as a freelance photographer for a local newspaper in her hometown in Hoexter, Germany at the age of 16. She worked for the European Press Photo Agency before joining the AP in 2002, based in Geneva. She had published two books.

• Mokhtar Amiri contributed to this report