A gunman apparently acting alone killed five Jordanian intelligence agents on Monday in a daylight "terrorist attack" on their office in a Palestinian refugee camp north of the capital.
Jordan is a leading member of the US-led coalition fighting the Islamic State group in neighbouring Iraq and Syria, and has been the target of previous jihadist attacks.
"The intelligence agency office in the Baqaa camp was the target of a cowardly attack shortly before 7:00 am Monday that left five agents dead," government spokesman Mohammed Momani said.
Momani said security forces were investigating who was behind the "terrorist attack" on the first day of Ramadan.
A security source told AFP preliminary findings suggested the attack was carried out by a lone gunman who opened fire with an automatic weapon before escaping.
The shooting happened as the team members were starting their shift.
It was unclear whether the gunman was a resident of the camp or an outsider, the source said, adding that experts were examining CCTV footage for clues.
Jordan has seen spillover from the conflicts in Iraq and Syria in the past.
In December 2005, suicide attacks on three Amman hotels claimed by IS's predecessor Al-Qaeda in Iraq killed 60 people and wounded dozens.
The Baqaa camp is 20 kilometres from central Amman and is the largest of the kingdom's 10 official Palestinian refugee camps.
On Monday, security forces blocked the road to the camp to keep journalists away, an AFP correspondent said.
The five killed in the attack were buried later in the day.
Former member of parliament Mahmud al-Kharabsha said what happened had been "expected".
"This camp was chosen for an attack in order to sow sedition (between Palestinians and Jordanians) in the country," Kharabsha said in Baqaa.
'Midst of a cyclone' 
"What happened was expected. Jordan is in the midst of a cyclone and shares long borders with Syria and Iraq," he told AFP.
Baqaa -- which suffers from chronic poverty and unemployment -- houses about 220,000 people, including more than 100,000 of the two million Palestinian refugees who live in Jordan.
One Baqaa resident who identified himself as Yussef called the attack "unacceptable", coming on the first day of Ramadan.
"It is an attempt to create divisions in the country," he said.
Baqaa was one of six camps set up in 1968 to house Palestinians fleeing the West Bank and the Gaza Strip as a result of the 1967 Six-Day War during which Israel seized the Palestinian territories, east Jerusalem and the Golan Heights.
Baqaa was the home of Mahmud Abdelal, an Islamist extremist who blew himself up in Syria in October 2012.
In 2010, three Jordanian Islamist extremists were sentenced to prison terms of between three years and life for plotting to kill intelligence officers in the camp.
According to sources close to Islamists, almost 4,000 Jordanians have joined jihadist groups in Iraq and Syria, where an estimated 420 have been killed since 2011.
Jordan has carried out air strikes against IS in Syria since 2014.
One of its pilots was captured by the jihadists when his plane went down in Syria in December 2014. In February 2015, IS released gruesome footage of Maaz al-Kassasbeh being burned alive in a cage.
His murder prompted Jordan to extend its air strikes against IS to Iraq, where it is the only Arab coalition member taking part in the bombing campaign.
Jordan has also opened up the Prince Hassan airbase, northeast of the capital, to other members of the US-led coalition in the air war.
In March, Jordanian authorities announced they had foiled an IS plot to carry out attacks in the kingdom in an operation that led to the deaths of seven jihadists.
Related Story