Interior minister says Islamic State of Iraq and the Levant supporters had planned more attacks on civilians and police.

Jordan's interior minister said on Monday those behind an attack on police supported Islamic State of Iraq and the Levant (ISIL), and investigations revealed plans for more violence against security and civilian targets.

Sameer al-Mobaideen said the assailants did not belong to any group but subscribed to ISIL's ideology. All Jordanian nationals and there were no signs so far they had foreign links, he said, refusing to give names of the suspects.

"The investigations are secret and ongoing," Mobaideen told a news conference.

Government spokeswoman Jumana Ghuneimat said security forces found a "horrifying" amount of homemade explosives buried in the central Jordanian town of Salt, near the suspects' hideout. The explosives were apparently intended for attacks on civilians in public places and on security installations.

Jordanian search teams pulled the bodies of three attackers from the rubble of their hideout on Sunday, hours after they opened fire and set off explosions that killed four security force members trying to storm the building.

Officers made five arrests following the shootout, according to Ghunaimat.

The clash that began late on Saturday was among the deadliest between fighters and Jordanian security forces in recent years. It raised new concerns about attempts by domestic and foreign fighters to carry out attacks and destabilise the kingdom.

Jordan has played a key role in an international military coalition that helped push back ISIL in neighbouring Syria and Iraq.

Home-made bomb

The chain of events in Jordan began Friday when assailants detonated a home-made bomb under a police car guarding a music festival in the predominantly Christian town of Fuheis, west of the capital of Amman.

Security forces chasing the suspects zeroed in on a multi-storey building in the town of Salt, near Fuheis, and attempted to storm it.

A shootout ensued and the structure partially collapsed after the suspects rigged it with explosives that detonated during the raid. It was unclear how many people were hiding in the three-storey building.

Prime Minister Omar al-Razzaz said Jordan would "not be complacent" in finding those responsible.

"Jordan will always be at the forefront of the fight against terrorism and obscurantist ideas, which target the lives of innocents and try to undermine security and stability," he said in a statement to Petra news agency.

Jordan is an ally of Israel and Western powers, including the United States and the United Kingdom.

The Middle Eastern kingdom has been hit by a number of attacks in recent years, including a suicide bombing in 2016 that killed seven guards near the border with Syria, which ISIL claimed responsibility for.

Months later in another ISIL-claimed attack, 10 people were killed in a shooting in the tourist town of Karak.

Jordan has cracked down on those expressing support for such groups, imposing prison terms of several years for suspected sympathisers, including those who share controversial ideologies on social media.