Five Jordanian intelligence officers have been killed in an attack on a security office outside a Palestinian refugee camp close to Amman, a government official told national media.

Jordanian television quoted government spokesman Mohammad al-Momani on Monday as saying the assault on the office near the Al Baqa'a refugee camp on the outskirts of the Jordanian capital was a "terrorist attack".

Security forces have arrested a suspect in the attack at the intelligence department's local office near the camp that houses more than 70,000 refugees, Jordanian TV reported.

Also read: Jordan changes constitution to give King more power

As well as the three officers, a guard and a telephone exchange operator at the office were killed. The official said that the incident took place just outside the sprawling camp at 7am, but gave no further details.

"This terrorist attack is a clear example of the criminal behaviour of these individuals. Security agencies have launched an investigation and are now pursuing the killers," he said.

Baqa'a camp is the largest Palestinian refugee camp in Jordan, where a large percentage of the country's seven million-plus population are descendants of refugees who fled in the aftermath of the creation of Israel in 1948.

Husam Abdallat, a former senior government official, told Al Jazeera that the intelligence office is located on the main street leading up to the camp.

He added that its proximity to the Palestinian refugee camp might trigger discontent between Jordanians and Jordanians of Palestinian origin.

"We hope this is not the case, because Jordanians must stay united, especially in times like this," Abdallat said.

Fight against ISIL

Earlier this year a large security operation was mounted in the northern city of Irbid in which several Islamic State of Iraq and the Levant (ISIL, also known as ISIS) sympathisers were killed.

Jordan has been carrying out air strikes against ISIL in both Iraq and Syria.

One of its pilots was captured by fighters when his plane went down in Syria in December 2014. ISIL later released gruesome footage of him being burned alive.

Jordan has also opened up the Prince Hassan airbase, northeast of the capital, to other members of the United States-led coalition taking part in the war against ISIL.

In March, Jordanian authorities announced that they had foiled an ISIL plot to carry out attacks in the kingdom in an operation that led to the deaths of seven fighters.