An Indonesian family brought its eight-year-old daughter to a suicide bomb attack it launched Monday on the police headquarters in the country's second-largest city, authorities said, a day after members of another family conducted coordinated suicide bombings on three city churches that killed 12 people.

National police Chief Tito Karnavian said a girl aged about eight who was with two of the attackers on a motorcycle survived being thrown by the blast at Surabaya's police headquarters. The attack killed the four perpetrators. Six civilians and four officers were wounded.

The attack came just hours after police said the family that carried out the church bombings included girls aged nine and 12.

The flurry of attacks have raised concerns that previously beaten down militant networks in the world's most populous Muslim-majority nation have been reinvigorated by the return of some of the estimated 1,100 Indonesians who went to fight with the Islamic State in Iraq and Syria (ISIS). Experts have warned for several years that when those fighters return, they could pose a significant threat.

Civilians near blasts

ISIS claimed responsibility for the church bombings in a statement carried by its Aamaq news agency. Karnavian, however, said earlier police comments that the family had spent time in Syria were incorrect.

He said the church bombers and the police headquarters attackers were friends, as were another family whose homemade bombs exploded in their apartment Sunday night.

Officers blocked the road outside the headquarters after the attack. (Achmad Ibrahim/Associated Press)

The use of children in the attacks has been particularly horrifying to people.

"This is terrifying," said Taufik Andrie, executive director of an institute that runs programs to help paroled militants reject extremism and rejoin society. "This is showing how extremist ideology can entrap children. Children have no choice. They can't comprehend the decisions involved."

All told, 25 people have died since Sunday including a total of 13 militants and their children.

Indonesian President Joko (Jokowi) Widodo condemned the attacks as "barbaric" and vowed that authorities would root out and destroy Islamic militant networks. The top security minister, Wiranto, who uses one name, said the government will attempt to hasten passage of an updated anti-terrorism law that has languished in parliament.

Security camera footage of the attack on Surabaya's police headquarters showed at least one explosion after the four attackers rode two motorcycles up to a security checkpoint. The motorcycles, which moved closely together, pulled up alongside a car and four officers manning opposite sides of the checkpoint.

Two men, apparently civilians, were walking into the area just meters from the motorcycles at the moment of the explosion, which a split second later was followed by a second possible blast.

ISIS doesn't mention children

Indonesia's deadliest terrorist attack occurred in 2002, when bombs exploded on the tourist island of Bali, killing 202 people in one night, mostly foreigners. Jemaah Islamiyah, the al-Qaeda affiliated network responsible for the Bali attacks, was obliterated by a sustained crackdown on militants by Indonesia's counterterrorism police with U.S. and Australian support.

Karnavian has said the father of the family that carried out the church bombings was head of the Surabaya cell of Jemaah Anshorut Daulah, an Indonesian militant network affiliated with ISIS that has been implicated in attacks in Indonesia in the past year. All six members of the family were killed.

An officer gestures as police block a road outside the police headquarters. (Achmad Ibrahim/Associated Press)

The ISIS statement claiming the attacks didn't mention anything about families or children taking part and said there were only three attackers. The group also claimed responsibility for a hostage-taking ordeal last week by imprisoned Islamic militants at a detention centre near Jakarta in which six officers were killed.

Separately on Sunday, three members of another family were killed when homemade bombs exploded at an apartment in Sidoarjo, a town bordering Surabaya, police said.

The church attacks occurred within minutes of each other, according to Surabaya police spokesperson Frans Barung Mangera.

Karnavian said the father drove a bomb-laden car into the city's Pentecostal church. The mother, with her two daughters, attacked the Christian Church of Diponegoro, he said. Based on their remains, Karnavian said the mother and daughters were all wearing explosives around their waists.

The sons aged 16 and 18 rode a motorcycle onto the grounds of the Santa Maria Church and detonated their explosives there.