The Taliban claimed responsibility Friday for a shooting incident at a military base attached to Kabul’s international airport Thursday that killed three American civilian contractors and wounded a fourth, saying the attacker had infiltrated the ranks of the security forces.

The contractors worked for Praetorian Standard Inc., or PSI, a small firm based in Fayetteville, N.C., with offices in Maryland and Virginia. According to its Web site, the firms says “it specializes in providing innovative strategic planning, logistics, operational and security management support services in challenging environments around the world.”

In a statement Friday, the company confirmed that “three employees of Praetorian Standard, Inc. were killed and one was wounded in Afghanistan while supporting the efforts of the U.S. Government.” It added: “This was a terrible day for the families involved, our company and the United States. We are shocked by the tragic nature of these deaths and offer our deepest condolences to the families of these brave men.”

The company has worked in Afghanistan since 2010, mostly providing logistics, transportation and security support to a Defense Department and U.S. Geological Survey program that is exploring potential mineral deposit sources in Afghanistan.

The victims, whose names have not yet been released, were working out of the firm’s Kabul office.

In Twitter messages and a subsequent statement, Taliban spokesman Zabiullah Mujahid identified the shooter as Ihsanullah bin Mullah Rahmatullah, from Laghman province in eastern Afghanistan. He said the man had infiltrated the ranks of the Afghan security forces in anticipation of an opportunity to attack Americans and was working at Kabul’s airport.

“He managed yesterday evening to attain his goal and opened fire with his rifle on a group of American occupiers,” the spokesman said. The attacker was then “martyred by return fire,” Mujahid said.

“The martyr was able to successfully defend his religion . . . and the glory of his country, and by giving himself away as a sacrifice, he cast a number of the occupying disbelievers into the abyss of hell,” Mujahid said.

He gave a higher casualty figure for the attack, claiming that “three American soldiers died and four others were critically wounded.”

Authorities said Thursday that an Afghan national was also killed in the attack, but it was not immediately clear whether that person was the shooter or an additional victim.

Immediately after Thursday’s attack, suspicion fell on a possible “insider attack” perpetrated by a member of the Afghan security forces who also had access to the military base at the airport. An unidentified Afghan air force official told the Reuters news agency the shooter was an Afghan soldier.

It was not immediately clear how the contractors were attacked.

Afghan Air Force helicopters land at the airport. (Mohammad Ismail/Reuters)

Referring to the attacker as an “infiltrator,” Mujahid used a term often used by the Taliban for an insurgent who had penetrated the Afghan army or police for months or years, waiting for an opportunity to strike.

When asked Thursday whether the incident was an insider attack, a U.S. military spokesman, Col. Brian Tribus, declined to comment. He said there would be no further comments on the incident until the investigation was complete.

The sprawling base where the shooting occurred is protected by tall concrete blast walls and filled with hangars, office trailers and maintenance buildings. It is a hub for the coalition’s air operations, as well as the main base of the Afghan air force.

As of last year, before a drawdown of U.S. combat forces, it was home to as many as 4,000 foreign military personnel and civilian contractors from more than a dozen nations, including the United States. Top U.S. commanders spent much of their time there.

Insider attacks have long plagued the relationship between Afghan forces and their U.S. and international allies, breaking down trust and reducing interaction. The assaults by rogue Afghan soldiers or police particularly rose in the last years of the NATO combat mission, which formally ended in December. Assaults reached record levels in 2012, when there were 37 such attacks that killed 51 people, including 32 U.S. troops, according to the Pentagon.

Since then, U.S. and coalition forces have tightened vetting procedures for Afghan security forces and required that all foreign troops be armed at all times. The efforts have reduced the number of insider attacks, but they nevertheless remain a major concern.

The killings were a reminder of the threats faced by the roughly 10,600 U.S. troops and thousands of American contractors who remain in Afghanistan, mostly to train and advise Afghan security forces. Such tasks require close interaction with Afghans, and it remains to be seen whether the attacks will have an adverse impact or restrict such relationships.

“We can confirm that there was a shooting incident at North Kabul International Airport complex 29 January at approximately 6:40 p.m.,” Tribus said in an e-mailed statement. “Three coalition contractors were killed as was an Afghan local national. This incident is under investigation.”

A U.S. defense official in Washington, speaking on the condition of anonymity because he was not authorized to discuss the nationalities of those killed, said the contractors were all Americans and that the fourth one had been wounded.

In August, a gunman wearing an Afghan army uniform opened fire at a military training school near Kabul, killing U.S. Army Maj. Gen. Harold J. Greene. He was the highest-ranking U.S. officer to be killed in 13 years of war in Afghanistan and the first general to be killed in the line of duty since the Sept. 11, 2001, attacks that prompted the United States to intervene militarily in Afghanistan, combining with Afghan resistance forces to topple the radical Islamist Taliban regime.

Virtually everyone on the base at the Kabul airport is armed. But that did not stop U.S. military officials from worrying about insider attacks during a flag-lowering ceremony in early December that marked the official end of the coalition’s combat mission. Before the ceremony, the officials warned journalists that if any rockets landed, or if anyone started shooting, to run and take cover.

With the U.S. military drawdown, civilian contractors have become more visible. Even though their numbers have also sharply decreased, thousands of contractors remain in Afghanistan, most of them based in Kabul.

As of mid-2014, about 17,400 U.S. citizens were working in Afghanistan as civilian contractors for the Defense Department, according to military figures reported by the Web site Danger Zone Jobs. Other private contractors work for various international relief and development organizations. A year earlier, the Congressional Research Service put the number of Pentagon contractors at about 33,000.

Thursday’s killings broke a roughly three-week lull in violence in the capital. In the last two months of 2014, the Taliban intensified its attacks in Kabul and other parts of the country, targeting foreigners as well as influential Afghans and symbols of government authority.

The shooting was the first suspected insider attack since U.S. and NATO forces formally terminated their combat mission in Afghanistan. Under an agreement with the Afghan government, the previous coalition force is being replaced by a follow-on mission dubbed “Resolute Support,” which began Jan. 1 and consists of about 12,000 mostly U.S. troops focused on training.

Earlier on Thursday, a roadside bomb killed a police commander and three other people in the eastern province of Laghman, and a suicide bomber targeted the commander’s funeral later in the day, according to Afghan officials. They said 16 people — four policemen and 12 civilians — were killed and 39 were wounded when the bomber mingled with mourners in the town of Mehtar Lam and detonated his explosives.

Ryan reported from Washington. Daniela Deane contributed from London, William Branigin from Washington.