A Kenyan police officer stationed at one of the gates of the president's official residence in Nairobi has died after being shot with an arrow, officials have said.

Police reported that on Monday morning, a 56-year-old man, armed with a bow and arrows, approached officers at the State House gate and was ordered to surrender. Instead, he moved forward and shot PC Ramadhan Matanka in the ribs.

The policeman was immediately taken to hospital but died while undergoing treatment, according to a police statement.

This attack has raised questions about potential security lapses, as State House is one of Kenya's most heavily guarded locations.

PC Matanka's body is now in a mortuary awaiting a post-mortem examination.

An investigation is also underway to establish the motive behind the attack. Local media have reported that the deceased officer had been screening vehicles entering State House.

The alleged attacker, who reportedly disguised himself as a homeless person carrying a sack that concealed the weapons, was detained following the assault.

Video footage published by Kenyan television channel NTV later that day showed a handcuffed man with visible injuries, who was reportedly being taken to hospital for treatment.

The man is expected to appear in court soon, local media report.

The National Police Service condemned this heinous act and commended the officers for their swift response, which prevented further harm. Police spokesperson Muchiri Nyaga expressed condolences to the family of the deceased officer, noting that he had paid the ultimate price in the line of duty.