In a ruling delivered by Milimani Chief Magistrate, Francis Andayi, the mechanic was handed the harsh sentence as his actions were considered a matter of national security.
The suspect was charged alongside four others with robbing a Chief Inspector of Police, David Machui, a BMW 735 car model that was valued at Ksh1.2 million at the time.
The incident happened in Utawala, Nairobi area on August 26, 2014, where the senior police officer was robbed at gunpoint in what was described as a case of carjacking.
The charge sheet presented in court indicated that the mechanic was armed with an AK-47 rifle and another pistol at the time of committing the crime.
The second count indicated that the suspect was planning to dispose the car knowing that it was unlawfully obtained from the government.
The mechanic was charged alone after it emerged that two of the other accused persons had since died and the Judge had to acquit them.
One of the accomplices reportedly died under unclear circumstances after he was released on bond in 2017.
The second co-accused was was found dead in Uganda with police reports indicating that he died of natural illness.
Two other car dealers were acquitted due to lack of evidence linking them to the theft of the motor vehicle.
The case attracted global attention raising questions on the state of national security. It took the intervention of Ugandan law enforcement authorities to recover the car.
Reports at that time indicated that the mechanic was lured into a trap at Wandegeya, a low income Kampala suburb near Makerere University. He was then waylaid by specialised police unit and the vehicle recovered.
The recovery was made public by Asan Kasingye, the director of Interpol in Uganda.
â€œOur counterparts informed us that their Presidentâ€™s car that was stolen at gunpoint was heading to Uganda. So we started to monitor and we recovered it and we have sent it back to Kenya,â€ Kasingye stated.
The mechanic allegedly managed to drive one of the most tracked vehicles from Nairobi to Kampala after removing the tracking system in a garage in Nairobi.