PESHAWAR, Pakistan (Reuters) - Suicide bombers attacked a court complex in Pakistan on Tuesday, killing five people and wounding 20, police officials said, the latest incident in a new surge of Islamist violence.

All three of the attackers were carrying hand grenades and AK-47 assault rifles, Ijaz Khan, police chief in the northwestern district of Charsadda, told Reuters.

One attacker blew himself up outside the court, while two were killed by policemen before they could enter the building.

“The terrorists had come and wanted to kill as many people as they could inside the judicial complex,” Khan said. “Five people were killed in the attack.”

Besides lawyers and judges, hundreds of litigants visit the building every day.

A spokesman for Jamaat-ur-Ahrar, a faction of the Pakistani Taliban, claimed responsibility for the attack in a statement emailed to media.

Last week, the militant faction released a video announcing a new campaign of attacks against the government, including the judiciary, police and the army.

Slideshow ( 7 images )

A series of bombings last week, in which more than 100 people were killed, has shattered a nascent sense that the worst of the country’s militant violence might be in the past.

The deadliest of last week’s attacks was on a famous Sufi Muslim shrine in the southern province of Sindh and was claimed by the Middle-Eastern militant group Islamic State.

Islamic State has a small but increasingly prominent presence in Pakistan.

Fighters loyal to it are known to be operating under different names in Pakistan to attack the government, army and members of religious minorities.

Most of the other recent attacks have been claimed by factions of the Pakistani Taliban, which is waging its own fight against the government but whose ranks have also cooperated with, and sometimes defected to, Islamic State.

A witness, Mohammad Shah Baz Khan, who was inside the court complex when the attack unfolded, described scenes of panic, saying several people scaled the walls of the building to escape.

“Lawyers and other people in the complex started running to save their lives. There was panic and nobody knew where to go,” Khan told Reuters.

Television footage showed wounded people being taken to hospital. Provincial health officials said the critically wounded would be treated at a major hospital in Peshawar, about 30 km (20 miles) from Charsadda.