Pakistani officials say government forces have killed at least 25 pro-Taliban militants in fighting near the border with Afghanistan.

The officials, speaking Thursday on the condition of anonymity, say the fighting broke out late Wednesday in the Bajaur tribal region.

They say the militants attacked government forces at a security checkpoint, killing two soldiers.

The Bajaur tribal region is a known haven for Taliban and al-Qaida militants, and officials suspect they use the area as a base for attacks in neighboring Afghanistan.

Meanwhile, Pakistan says security forces have killed a top militant commander and eight other insurgents in the country's northwest region.

A military statement Wednesday says commander Ali Bakht was a close aide to pro-Taliban cleric Maulana Fazlullah.

The military operation took place in the Kabal area of Swat Valley, one day after Taliban leaders warned the government to halt its crackdown on insurgents there or face an onslaught of suicide attacks.

At least 125 people have been killed in clashes with security forces in the region this week.

The violence has risen despite a May peace deal between pro-Taliban militants and provincial leaders. Militants resumed their attacks in July, claiming the government violated the agreement.

Some information for this report was provided by AFP, AP and Reuters.