Updated

PESHAWAR, Pakistan -- Islamist militants who flowed out of Afghanistan fought a second day of fierce battles with Pakistani security forces Thursday in one of the deadliest clashes on the Pakistan side of the frontier in months. Authorities said 63 people were dead.

Signaling a deepening of the rift with the United States and voicing Islamabad's anger over the attacks, the government issued a statement late Thursday voicing Pakistan's "strong concern" about the attack.

Pakistan's military had initially said the assault was the work of about 200 militants, but the government statement put the number at between 300 and 400. It said the fighters "attacked villages and burned schools."

The militant attack and Pakistan's reaction contradicted the U.S. narrative about the poorly defined and porous border. Typically, militant cross-frontier movements originate in Pakistan, leaving the United States and NATO to gripe at Islamabad over its failure to stop the infiltration.

The new battles found Pakistan the aggrieved party, lending credence to Pakistani army commanders' complaints that NATO was failing to crackdown on militants sheltering on the Afghan side of the rugged frontier.

More On This...

The government statement said the foreign secretary had "stressed the need for stern action by the Afghan Army, US and NATO/ISAF forces in the area against militants and their hideouts in Afghanistan and against organizational support for the militants."

The fight started when the militants crossed into Pakistan on Wednesday. By nightfall Thursday, 25 soldiers, 35 attackers and 3 civilians had died in fighting, according to regional police chief Ghulam Mohammed.

Beyond emphasizing the difficulties of fighting an enemy that pays no attention to borders, the battle pointed to possible trouble for both the U.S. and Pakistan when Washington begins withdrawing troops later this year.

Pakistan is already complaining NATO doesn't have enough troops along the Afghan side of the border.

In the past, NATO and Pakistani forces staged coordinated "hammer and anvil" operations on the border, but relations between Washington and Islamabad hit a particularly rough patch, especially since the unilateral American raid that killed Usama bin Laden on May 2.

Even so, NATO officials say that border cooperation has not suffered as a result of the chill in ties.

Pakistan's northwestern border with Afghanistan is home to thousands of local and international Al Qaeda and Taliban militants. In broad alliance, they focus attacks on international and Afghan forces across the border, the Pakistani state or spend time plotting and training for international terrorist attacks.

Under heavy American pressure, Pakistan's army has moved forcefully into parts of the mountainous and sparsely populated region over the last four years. It previously had little or no presence, but the militants have proved resilient.

The clashes erupted Wednesday in Shaltalo town in Upper Dir district, which lies across the poorly defined and largely unpatrolled border from Afghanistan's Kunar region. Mohammed said some 200 militants crossed the border on Wednesday, and attacked a checkpoint manned by police and paramilitary troops, triggering the battles.

He said many of the attackers had fled back to Afghanistan as the fighting wound down later Thursday and the situation was now under control. Funerals were being arranged.

It was not possible to independently verify his account of the fighting.

On Wednesday, army commanders in Mohmand region, which also lies opposite Kunar, said their operation to clear the region of militants was being hampered because the insurgents were getting shelter on the other side of the border. In particular, they said the insurgents have free movement in a 6 mile-wide rugged swath between the River Kunar and the frontier.

"They are just sitting there, the flow of reinforcements are coming from there," said Maj. Nadir Zaeb, the head of the paramilitary Frontier Corps. "It would be ideal if there were strong blocks on the border."

NATO spokeswoman Colette Murphy acknowledged that "the terrain in that area provides 'natural' havens, but these are by no means 'safe' havens".

"As long as they are inside Afghanistan's borders, we will target them," she said.

While there is little doubt that militants cross from Afghanistan into Pakistan, the commanders' complaints carry a political edge to them. Pakistan has been accused for years of failing to crack down on, or even of supporting, powerful militant factions that shelter on its side of the border. They attack Western troops inside Afghanistan but do not directly threaten Islamabad.

Those accusations have grown louder as the Afghan war dragged on with uncertain Western success.

Adm. Mike Mullen, chairman of the Joint Chiefs of Staff, said Thursday Pakistan will have to sort out its damaged relationship with the United States before the Pentagon will be able to restore "very significant" cuts in its military training there.

Mullen said Islamabad remains committed to working with America, but it will take time to rebuild ties after the bin Laden raid.

He said it is critical to go after militants in North Waziristan so the Afghan war can succeed, but Pakistan has made no specific pledge to do that in the near future.

Pakistani generals who have lost more soldiers to militants than America has in Afghanistan bristle at the charge, and respond that Pakistan has deployed more soldiers on its side of the border than the West has across the whole of Afghanistan.

Pakistan has in the past offered to fence, or even mine, the border to try and stop infiltration, but has had little support in Afghanistan, chiefly because Kabul still does not accept the frontier. It was drawn by British colonial rulers more than 115 years ago.

The border between Mohmand and Kunar has always been particularly porous, and thousands cross it each day without passports, officers stationed in Mohmand said. The army has fought there since January to clear it of militants, which officers say flocked in from Afghanistan and other regions of Pakistan that had seen operations in recent years. They say it is now 80 percent cleared.