In 1977, Ali joined the Kenyan Army. He was eventually promoted to Brigadier in 2003 and to Major General in 2005. During his military career, he served as a military attaché in Zimbabwe and Uganda, and was commanding officer of the Western Brigade of the Kenya Army Paratrooper Battalion, as well as the Air Cavalry regiment in Embakasi. He is also a former chairman of the Ulinzi Starsfootball club.
Police
Ali was appointed to the position of Commissioner of the Kenya Police in 2004 by the former President of Kenya, Mwai Kibaki, while then holding the rank of Brigadier in the Kenya Army. Ali was the first Police Commander to assume office from a post outside the police force.
Anti-vice and corruption reform
Ali's first significant act upon his appointment was to disband the then feared Kenya Police Reserve, and to draft new recruitment procedures. He also authorised a mass clear-out of the police's hierarchy in a move to reform the force, which had long had a poor reputation and faced accusations of corruption and criminal involvement. The reform constituted the largest shake up of the police since independence.
Starting 2007, Ali's charges in the Kenyan police began severely cracking down on the notorious Mungikisect, a local politico-religious group and banned criminal organisation known for, among other things, decapitating policemen. For this perceived excessive use of force on its part, the police drew heavy criticism from human rights groups, particularly over the deaths of several hundred youth in its custody without trial over alleged links to the sect.
2008 post-election crisis
In 2008, controversy also surrounded the Kenyan police's response to the violence that rocked the country following a disputed presidential election, especially regarding a "shoot to kill" order that was alleged to have come out of Ali's office. According to a report investigating the Post election violence, gunshot wounds most likely from police guns were the biggest single cause of death among the fatalities. On 15 December 2010, Ali was named in a summons by the prosecutor of the International Criminal Court, Luis Moreno-Ocampo, in relation to his putative role in the events that followed the 2007 elections. The ICC prosecution alleged that Ali authorised the use of excessive force and facilitated attacks against supporters of the oppositionOrange Democratic Movement during the period's post-election violence. 0n 23 January 2012 the ICC pre-trial chamber II led by Judge Ekaterina Trendafilova ruled that there was not enough evidence against Mr Ali to sustain the charges.
The Alston Report
In 2009, Major General Ali was in the news again when a report by UN special reporter Philip Alston into extrajudicial killings recommended that he was a stumbling block to police reform and should resign. Alston reported that there was abundant evidence linking Ali to a central role in devising and overseeing the policy of extrajudicially executing large numbers of suspected criminals. According to the report, Ali refused to acknowledge that any unlawful killings were taking place, and prevented all transparency. This was despite at least one observer describing him in the Nairobi Chronicle as "without doubt, the most effective police chief Kenya has seen in a long time". While never shying away from making use of all of the available means open to him as head of Kenya's police, during his time as Commissioner, Ali, among other things, re-equipped the police with new patrol trucks and vehicles, secured modern policing equipment for his charges, revitalised the police over the long term by increasing the recruitment of officers, and improved the sharing of information between the police and the public.
Postal Corporation
On 8 September 2009, Ali was transferred from his position as Police Commissioner to Chief Executive of the Postal Corporation of Kenya.