KABUL, AFGHANISTAN — Afghan central government authorities on Wednesday began questioning the police commander who killed an Associated Press photographer and wounded an AP reporter, a day after he was transferred by helicopter to the capital — a rare case in which an Afghan officer or soldier who shot a foreigner was captured alive.

Local security officials who spoke with the suspect after he was first detained said he seemed a calm, pious man who may have come under the influence of Islamic extremists calling for vengeance against foreigners over drone strikes. Witness and official accounts so far have suggested the shooting was not planned.

But the Afghan Interior Ministry, which is overseeing the investigation, told the AP it won’t speculate about a motive so early in its probe into the attack, which killed AP photographer Anja Niedringhaus and seriously wounded senior correspondent Kathy Gannon.

The suspect, identified as a unit commander named Naqibullah, surrendered immediately after the attack Friday in front of dozens of security forces and election workers on a heavily guarded government compound in eastern Afghanistan. The shooting was the first known case of a security insider attacking journalists in Afghanistan, part of a surge in violence targeting foreigners.

Niedringhaus and Gannon were traveling in their own car with an AP freelancer and a translator in a convoy of workers transporting election materials from Khost, the capital of the province of the same name on the border with Pakistan, to the outlying district of Tani.

The convoy went first to the district government’s headquarters. The two foreign correspondents spoke to and photographed Afghan policemen and soldiers in the area, witnesses said, but it started to rain and they were worried about their equipment so they got back into the backseat of their car to wait for the convoy to move to deliver ballots to a nearby village.

The shooter, who was wearing his police uniform, approached the car and stuck the barrel of the AK-47 in the backseat window, shouted “God is great!” and started firing, according to the witnesses and officials.

“The good thing is that he is alive in this case because usually in these kinds of incidents the shooter either is killed or he escapes from the scene,” Interior Ministry spokesman Sediq Seddiqi said Wednesday in an interview, referring to attacks by Afghan police or soldiers on foreigners. “But this time our police acted professionally and he was immediately arrested.”

Gul Zahir, the Tani district police chief, said he was one of the first people to see Naqibullah, who was tackled by security forces after the shooting.

“I took custody of him. I asked him, ‘Why did you do this thing?’” he said in a telephone interview with AP. “Naqibullah said, ‘I don’t know.’”

However, the suspect gave different explanations to provincial officials who questioned him in the days he was in custody in Khost.

Gul Mohammad, the counterterrorism director in Khost who participated in the initial questioning, said Naqibullah at first claimed the attack was in revenge for a Jan. 15 airstrike in the Ghorband district of Parwan province, a bombing which prompted a wave of anger against foreigners.

The Afghans claimed 12 civilians and four Taliban fighters were killed in the airstrike. The U.S.-led coalition said the Afghan government had requested the operation ahead of the country’s April 5 presidential elections because the area had fallen under Taliban control.

But the Interior Ministry said Naqibullah was from an area in Parwan that was not connected in any way with the airstrike.

“There was no record of any drone strike in the whole area where he lived, where his family is living,” Seddiqi said. “The initial statement does not really indicate anything so far. We do not have still any clarity on the motives.”

The Khost counterterrorism director said Naqibullah also claimed he was inspired by a lawmaker and a cleric who encouraged holy war against Americans and other foreigners. “He said, ‘Thank God I didn’t kill any Muslims.’”

Seddiqi, the Interior Ministry spokesman, said he had seen reports from local authorities describing Naqibullah as a calm and devout Muslim who had been stationed in Khost city for a year and a half, had no criminal background and was not known to use drugs.

“His (previous) behavior was quite normal,” Seddiqi said. “Nobody had noticed in the past any strange behavior from him. There’s nothing that could suggest or link his act to any fundamentalist violence or extremism.”

Zahir, the district police chief, agreed, though he noted that Naqibullah prayed five times a day as is Muslim tradition and constantly read the Quran, Islam’s holy book.

He said Naqibullah had asked for his own room on the base so he could have privacy to read but that there was not enough space so he had to share with a roommate. He said the suspect, who is in his late 20s, was married three months ago and had no children.

Naqibullah was armed with only a pistol on Friday but demanded a subordinate give him an AK-47 automatic rifle, which he used to open fire on the journalists, according to regional officials.

Past insider killings have raised concern about the infiltration of the Taliban and allied militants in the government security forces, although other motives have ranged from personal disputes to traumatic stress.

Still, the shootings of Niedringhaus, a German photographer who had covered conflict zones from the Balkans in the 1990s to Iraq, Libya and Afghanistan, and Gannon, a Canadian who has reported from Afghanistan since the 1980s, were the latest in a spike of attacks targeting foreigners.

Niedringhaus, 48, died instantly of her wounds. A funeral service will be held on Saturday at Corvey Abbey, a Benedictine monastery near her birthplace in Hoxter, Germany.

Gannon, 60, was severely wounded in both wrists and the right shoulder. She was treated at a hospital in Khost before being evacuated to a French-run NATO military medical facility in Kabul and eventually transferred to a hospital in Germany, where she is in stable condition.

“We are heartened by her progress,” said Paul Colford, director of media relations for AP. “She has been alert and aware and has been talking to relatives and close friends since Monday afternoon.”