At least three gunmen attacked the National Database and Registration Authority in Pakistan's northwest Charsadda district, witnesses said.

Local media reports said the attack was foiled when police returned fire and the attackers fled, prompting a search operation.

"All schools near the area are shut under further notice," a resident and a witness, Shoukat Iqbal, told Al Jazeera.

It was not immediately clear if there were any casualties.

On Tuesday, Pakistan Taliban Jamaat-ur-Ahrar faction claimed responsibility for the attack in town of Tangi in the district of Charsadda, where suicide bombers attacked a court complex in northwestern Pakistan, killing at least six people.

A wave of recent attacks has gripped Pakistan. In one of the attacks last week, dozens of worshippers gathered at a famed Sufi shrine were killed when an Islamic State of Iraq and the Levant (ISIL) group's suicide bomber walked into the shrine's main hall in the southern Sindh province and detonated his explosives. The death toll from that attack has since risen to 90.