Security forces pulled the bodies of three suspected militants from the wreckage of a building in a central Jordanian city on Sunday following a shoot-out in which four security personnel were also killed, the government said.
In a huge operation, Jordanian forces laid siege to the building in a residential part of Salt on Saturday night in search of those responsible for a bomb attack on a police van on Friday.
The police vehicle had been maintaining security near a music festival in the majority Christian town of Fuhais, near the capital Amman and 15 kilometres (about 10 miles) from Salt.
Four security personnel were killed during the operation after the suspected militants sought sanctuary in the multi-storey building in Salt, a hillside city, the government said.
The side of the building partially collapsed, possibly because of a blast from a suicide bomber inside, a security source said.
The shoot-out also left at least 20 people injured, including women and children living in the area. They had been taken overnight to a hospital in the capital, a medical source said.
Security forces had seized automatic weapons during a search of what was left of the building, government spokeswoman Jumana Ghunaimat told the media.
They later demolished the building and the security operation had now ended, Ghunaimat said on Sunday.
No group has claimed responsibility for Friday's attack on the van in Fuhais in which one policeman was killed and six others were injured.
Militants from Islamic State and other radical jihadist groups have long targeted the U.S.-allied Jordan and dozens of militants are currently serving long prison terms.
The government announced three days of mourning as thousands of people attended funerals of the security personnel who were laid to rest with full military honours.
Officials have not formally disclosed the identity of the militants but security officials say some evidence points to Islamic State-affiliated sleeper cells inside the kingdom.
Several incidents over the past few years have jolted Jordan, which has been comparatively unscathed by the uprisings, civil wars and Islamist militancy that have swept the Middle East since 2011.
It was not clear how many militants fled into the building which is in a busy residential quarter of Salt. But five had now been rounded up in addition to three earlier, security sources said.
Part of the building was blown up by the militants, according to Ghunaimat and a security source said it was believed a suicide bomber had blown himself up causing its partial collapse.
Jordan's Prime Minister Omar Razzaz had set up a "crisis cell" bringing in top security and government officials to coordinate the large security operation deploying hundreds of forces.
The security forces were investigating if the militants were part of a wider sleeper cell network of Islamist radicals that had planned a series of attacks, an official source said.
Jordan said in January that it had foiled an Islamic State plot that included plans for a series of attacks last November on security installations, shopping malls and moderate religious figures. It arrested the suspects.
Security forces have been extra vigilant with warnings that sympathisers of Islamic State could launch revenge attacks after the militants were driven out of most of the territory they once controlled in Syria and Iraq.
Intelligence officials and some experts believe widening social disparities and a perception of widespread official corruption is fuelling a rise in radicalisation among disaffected youths in a country with high unemployment and growing poverty.