Pakistani forces say they have killed more than 40 militants in fighting along the Afghan border.

Officials say Pakistani security forces targeted militants in the Bajaur region Wednesday as part of an ongoing operation to rid the area of Taliban and al-Qaida-linked militants.

They say foreign fighters were among 30 militants killed in Bajaur.

In a separate incident in the country's northwest, military officials say between 75 and 100 militants stormed a military post in the South Waziristan tribal region late Tuesday.  Security forces retaliated, killing at least 11 militants in the resulting clash.

Pakistan's military has imposed a curfew in South Waziristan's main town of Wana Wednesday.

Security forces have been targeting militants in the country's northwest for several weeks. More than 500 militants and 22 soldiers have been killed in Bajaur, with thousands more people displaced in the offensive.

Pakistani officials also say the violence that has gripped parts of the country has now spread to one of the country's universities.

Earlier, Pakistani police said an explosion at a cafe on the outskirts of the capital, Islamabad, killed at least five people and wounded more than 16 others Tuesday.

The cause of the blast is under investigation, but local authorities say it was likely a bomb.

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