WASHINGTON (Reuters) - Two NATO helicopters fired upon by Pakistani forces on Thursday were U.S. military aircraft operating inside Afghanistan, the Pentagon said.

Slideshow ( 2 images )

“They were U.S. helicopters,” Pentagon spokesman Bryan Whitman told reporters at a briefing. “The flight path of the helicopters at no point took them over Pakistan.”

A Pakistani military spokesman said the helicopters had crossed the border into Pakistani territory, while Pakistan’s president, Asif Ali Zardari, denied troops had shot at the helicopters, insisting that only warning flares had been fired.

Zardari, speaking to reporters in New York with U.S. Secretary of State Condoleezza Rice, said the border area between Pakistan and Afghanistan was often unclear, a comment Rice agreed with, saying “yes, the border is very, very unclear.”

Whitman said U.S. and NATO military officials were speaking to their Pakistani counterparts to determine what had happened and to ensure there would be no recurrence.

“This is an unfortunate incident. It just goes to demonstrate the importance of coordination along that border,” he said. “The Pakistanis have to provide us with a better understanding of why this took place.”

Citing early reports, Whitman said neither helicopter was hit by ground fire and did not return fire against Pakistani positions.

Officials said the aircraft would likely have fired back had they been hit. “We avoided a serious incident,” Whitman said, but added: “The incident is troubling, no doubt”.

Frustrated by an intensifying Taliban insurgency in Afghanistan, the United States has stepped up attacks on militants inside Pakistan with six missile attacks and a helicopter-borne ground assault this month.

Pakistan strongly condemned the raids and said it would not tolerate any infringement on its territory. The Pakistani army has vowed to stand up to aggression across the border.

Since the September 3 U.S. commando raid in South Waziristan, there have been reports of two other incidents in which Pakistani forces were said to fire on U.S. helicopters crossing the border. In both cases, U.S. officials have denied the reports.

The Pakistani military also said it recovered a pilotless aircraft that crashed in South Waziristan this week. A Pakistani security officer described it as a U.S. aircraft that tribesmen claimed to have shot down. The Pentagon denied that any U.S. drones had been lost.