A top U.S. military commander has arrived in Pakistan for talks, as Pakistani forces continue to battle al-Qaida-linked militants along the Afghan border.

Admiral William Fallon, the commander of the U.S. military's Central Command, met with the head of Pakistan's army, General Ashfaq Kayani, Tuesday. The visit comes just hours after militants attacked a military fort in the tribal region of South Waziristan.

Pakistan's army spokesman, Major General Athar Abbas, says militants stormed a post in Ladha. At least five soldiers and 37 militants were killed in the clash. Army officials say troops were retaliating against the militant attack. He denied the military was carrying out a major offensive in the area.

Officials say at least two other soldiers were killed and at least six were wounded in fighting today in the neighboring region of North Waziristan.

Admiral Fallon recently spoke about the need for cooperation between the U.S. and Pakistan to fight insurgents near the Afghan border, where violence has escalated in recent weeks.

Militants in South Waziristan are led by al-Qaida and Taliban-linked commander Baitullah Mehsud, whom the United States and Pakistan blame for the assassination of former Prime Minister Benazir Bhutto.

Mehsud says he organized a series of suicide attacks against Pakistani military targets in the last year, but he denies a link to Bhutto's killing.

Pakistani President Pervez Musharraf is in Europe, where he is meeting with leaders to convince them his country is on course for democracy despite recent instability.