A terrorist attack on Pakistan's Bacha Khan University on Wednesday has claimed the lives of at least 25 people, including a professor, and injured 50 others, according to Daily News & Analysis.

Four armed militants stormed the Bacha Khan University campus in Pakistan's northwestern town of Charsadda at approximately 9:30 a.m. on Wednesday.

In the cover of fog, the militants gained access into the university through the back wall and opened fire at students and teachers on campus. Explosions were also heard during the attack as security forces exchanged fire with the terrorists, according to BBC News.

Nearly three hours after the attack began, the four militants were killed and government troops had regained control of the university, tweeted Lt. Gen Asim Bajwa.

Tehreek-e-Taliban Pakistan claimed responsibility for the attack and said that the assault was in retaliation to a military offensive against militant strongholds.

Pakistan Prime Minister Muhammad Nawaz Sharif condemned the "cowardly" attack and said that "those killing innocent students and citizens have no faith and religion," according to CNN.

"We are determined and resolved in our commitment to wipe out the menace of terrorism from our homeland. The countless sacrifices made by our countrymen will not go in vain," he added.

The attack takes places a day after a suicide bombing attack by the Taliban killed 10 people, including a child and five police officers in Peshawar, as HNGN previously reported.