The British government has warned its citizens to avoid traveling to Kenya and advised Britons already in the East African nation to be “vigilant” amid fears that a terrorist attack is imminent in the capital city of Nairobi.

The UK Foreign Office said it thinks that terrorists are in the “final stages” of planning attacks in Nairobi and perhaps elsewhere in Kenya.

The Kenyan authorities have alerted the public to a heightened threat from terrorist attacks in Nairobi,” the Foreign Office stated in a travel advisory.

We believe that terrorists may be in the final stages of planning attacks. Attacks could be indiscriminate and target Kenyan institutions as well as places where expatriates and foreign travelers gather, such as hotels, shopping centers and beaches. We strongly advise British nationals to exercise extra vigilance and caution in public places and at public events.

The warnings are somewhat unprecedented since Kenya relies heavily on tourism, particularly from Britain.

Kenyan police officials warned two days ago that the al-Shabab militant group based in neighboring Somalia have joined forces with al-Qaida operatives to engineer attacks in Kenya.

Over the past few months, Kenyan military forces have periodically engaged in battles with al-Shabab militants, even staging cross-border raids following the high-profile kidnappings of Western tourists.

The BBC reported that a number of people, including a British national, were arrested in connection with a foiled terrorist plot in Kenya last month.

A security correspondent for BBC, Frank Gardner, commented: “The main source of terrorist threat in Kenya comes from the Somali militant group al-Shabab, just across the border. It's vowed to carry out suicide bombings in Kenya, it has members living in Nairobi and it's proved it can strike overseas when it killed 76 Ugandan soccer fans in twin bombings in Kampala in 2010.”

Gardner added: “But Kenyan police also suspect a British connection in the current terrorism alert hovering over their country. A Briton was among several men arrested in December when Kenya believes it disrupted a major terrorist plot. British detectives flew down to help the Kenyans investigate. On Wednesday Kenya issued an arrest warrant for a suspect they say is a British woman. Separately, Whitehall officials say they are concerned that some Britons are traveling to Somalia to link up with al-Shabab militants.”

Kenya has suffered devastating terrorist attacks before, most spectacularly in 1999 when an attack on the U.S. embassy in Nairobi killed 200 people. Two years later, 13 people were killed when an Israeli-owned hotel in the coastal city of Mombasa was also attacked.