Knife attack outside US Embassy in Nairobi
A US security officer walks past the body of an assailant after he was shot dead by Kenyan police after stabbing an officer outside the US Embassy in the capital, Nairobi on 27 October Carl De Souza/AFP/Getty Images

The United States has closed its embassy in the Kenyan capital, Nairobi, today (28 October), following an attack on a policeman outside the embassy building on Thursday.

The temporary closure comes a day after a police officer shot dead a man who stabbed him as he stood guard outside the US Embassy in Nairobi. The country has been on high alert over reports of planned terror attacks from Somalia-based Islamic group al-Shabaab.

Following the shooting incident, the US Embassy issued a security message to its citizens. "Review your personal security plans, remain aware of your surroundings, including local events, and monitor local news stations for updates. Be vigilant and take appropriate steps to enhance your personal security," the embassy's statement read.

The diplomatic office confirmed "no embassy personnel were involved and no US citizens are known to have been affected by this incident".

The attacker, who was known to the authorities, was identified as a 24-year-old Kenyan Somali from Wajir in the country's north-east, close to the border with Somalia, according to a police spokesman. His motive remains unclear.

"The officer fired back in self-defence and managed to kill (the attacker). My officer is in hospital in a stable condition. The victim died on the spot," Vitalis Otieno, the Gigiri division commanding officer of the Nairobi Police, was quoted as saying by CNN.

According to police, the attacker was close to the public entrance to the visa section of the US Embassy when he attacked the police officer.

Located in Nairobi's Gigiri district, the US Embassy is situated alongside several other diplomatic missions and United Nations offices.