A suicide bomber detonated his explosive-laden vehicle at the main gate of a Pakistani police station early Tuesday, killing at least 23 officers and wounding 32 others.

The explosion caused a part of the building to collapse in the deadly attack in northwestern Pakistan, according to local officials via The Associated Press. The attack happened in Dera Ismail Khan, a city in the Khyber Pakhtunkhwa province bordering Afghanistan.

Some militants also opened fire toward the structure, leading to a shootout with security forces that lasted hours before three attackers were gunned down, police officer Kamal Khan said.

The death toll from the attack is expected to rise as some of the wounded officers were listed in critical condition, authorities said.

3 DEAD IN SOUTHERN PAKISTAN AS FIRE TEARS THROUGH COMMERCIAL BUILDING

Security officials examine damages on the site of a bombing

Security officials examine damages on the site of a bombing at a police station on the outskirts of Dera Ismail Khan, Pakistan, on Tuesday, Dec. 12. (AP)

Police launched a search operation in the surrounding area to detain the militants who escaped.

The province where the attack occurred is a former stronghold of the militant Pakistani Taliban group, also known as Tehreek-e-Taliban Pakistan, or TTP.

The newly formed militant group Tehreek-e-Jihad Pakistan, or TJP, claimed responsibility for the attack, saying in a statement it targeted the officers at the police station. TJP is believed to be an offshoot of TTP.

A larger number of security forces from across Pakistan have recently had a constant presence at the Daraban police station, where they were conducting intelligence-based operations against militants in the area with the support of local police, according to Khan.

PAKISTANI PROVINCE LOOKS TO DEPORT 10,000 AFGHANS PER DAY

Army soldier examines damages at bombing site

An army soldier examines damages on the site of a bombing at a police station on the outskirts of Dera Ismail Khan, Pakistan, on Tuesday, Dec. 12. (AP)

In a statement, Pakistan's caretaker Interior Minister Sarfraz Bugti condemned the attack and offered his condolences to the victims who were "martyred." He also described the attack as an act of "terrorism."

There has been a rise in violence in Khyber Pakhtunkhwa, with several deadly attacks this year, including in January, when at least 101 people, mostly police officers, were killed by a suicide bomber disguised as a policeman at a mosque in the northwestern city of Peshawar.

CLICK HERE TO GET THE FOX NEWS APP

The Pakistani Taliban have increased attacks on security forces since last year. Authorities said the militants have become emboldened while living openly in Afghanistan since the Taliban took over in 2021.

The TTP is a separate group but is a close ally of the Afghan Taliban.

The Associated Press contributed to this report.