The Taliban have claimed responsibility for an attack at the Kabul airport in which a gunman shot and killed three American contractors and one Afghan man.

Friday's claim came in a message from the Taliban spokesman, Zabihullah Mujahid.

A U.S. and an Afghan official said the shooting happened in the early evening hours Thursday, at the North Kabul International Airport complex. That section is military.

In a statement, Mujahid identified the attacker as Hessanullha from Laghman province. He said the Taliban fighter had infiltrated the ranks of Afghan forces to stage the attack and wore an Afghan police uniform.

The Afghan official, who is with the Defense Ministry said the attacker was in an Afghan army uniform. Both officials spoke on condition of anonymity because the investigation is still ongoing.

"It is unclear yet why he shot these advisers and no one else was there to tell us the reason," the official said, asking not to be named because he was not authorized to give statements to the media. "An investigation has been opened."

The international force in Afghanistan confirmed the shooting took place on Thursday evening.

A U.S. military spokesman in Afghanistan told the Washington Post that an investigation was underway.

“We can confirm that there was a shooting incident at North Kabul International Airport complex 29 January at approximately 6:40 p.m.,” said Col. Brian Tribus in an e-mailed statement to the paper. “This incident is under investigation. Further information will be released as available and appropriate.”

Al Jazeera and Reuters