Kayihura, a serving general, was once regarded as the most powerful military officer in the country but has recently fallen out of favour with Museveni who has ruled Uganda since he took power at the head of a rebel army in 1986.
Kayihura was appointed inspector general of police in 2005, the same year that a successful referendum was held on restoring multi-party democracy to the East African nation after a near 20-year ban on political parties.
His tenure as police chief was characterised by the proliferation of military-style units in the force and an increase in the perceived politicalisation of the police.
Since the March 2017 assassination of Felix Kaweesi — a senior policeman who had been viewed as his potential successor — Kayihura has come under pressure for failing to curb growing insecurity.
At least 23 women have been killed in unsolved murders around the capital, there has been a spate of deaths of foreign nationals and last week a woman from an influential family was killed after being held captive for three-weeks by kidnappers demanding a huge ransom.
The rising insecurity further discredited a police force widely viewed by the public to be incompetent and corrupt.
In the aftermath of Kaweesi’s assassination — which remains unsolved — Museveni said “criminals have infiltrated the police” and ordered Kayihura to “clean the police.”
Nevertheless, in May 2017 Kayihura’s contract was renewed.
Since then a rival security body — the Internal Security Organisation (ISO) — has made several high profile arrests of senior policemen viewed as being close to Kayihura who are accused of corruption and torture as well as gangsters who have admitted working with the police.
Some Ugandans have accused Kayihura of being too close to President Paul Kagame of Rwanda and there have been unsubstantiated accusations in the tabloid press that the pair have secretly plotted to overthrow Museveni.
In the same statement Museveni fired the minister in charge of ISO — Henry Tumukunde — who has been openly critical of police failings.
Tumukunde and Kayihura have been engaged in a public tussle for over 15 years.
Both men are veterans of the “Liberation War” which brought Museveni to power
Tumukunde had previously fallen out with Museveni when, in 2003, he had opposed the removed of term limits. In 2005 he was forced to resign as an MP representing the army and was arrested.
The man in command of the soldiers who arrested him was Kayihura.
By 2016 Tumukunde was rehabilitated and Museveni appointed him security minister.
Okoth Ochola will replace Kayihura as Inspector General of Police and General Elly Tumwiine has been appointed security minister, according to the statement.