NAIROBI (Reuters) - A Kenyan judge on Wednesday sentenced two police officers to death for killing a colleague and two civilians in 2014.

Kenya’s last execution was in 1987 and two years ago President Uhuru Kenyatta commuted all death sentences to life jail terms, removing nearly 2,800 convicts from death row.

But Wednesday’s decision could bolster the government’s argument that it is getting tough on police brutality after years of complaints by civilians and human rights groups that police use excessive force but officers are rarely brought to justice.

Amnesty International said the result was a victory against extrajudicial killings but the sentence should be commuted.

“The death sentence is a cruel and inhuman punishment and ultimately an injustice,” the human rights organization said on its Kenya’s office Twitter feed.

The government says it is fighting impunity and has also arrested some senior public officials on charges of corruption.

The Independent Police Oversight Authority (IPOA) said in a statement its investigation found that officers Benjamin Changawa and Stanley Okoti killed their colleague, Joseph Obongo, and two of his relatives, saying they were robbery suspects. Obongo was a bodyguard to a lawmaker.

It said the Director of Public Prosecutions took up the case once the watchdog recommended they be charged with murder. They were convicted this month, the third such verdict arising from an IPOA investigation.

“The accused faced no danger to use excessive force to kill the victims and should have performed their duty in most responsible manner,” Judge Stella Mutuku said in her ruling.

The police watchdog was formed in 2011 after police were blamed for the deaths of dozens of protesters in the violent aftermath of the disputed 2007 presidential election.

In 2016, two officers were jailed for seven years after a 14-year-old girl was shot dead during a raid on a house in the coastal district of Kwale County in 2014.

In April, another policeman was sentenced to 15 years after he was found guilty of killing a man in 2013 he suspected of stealing a mobile phone.

Treason, murder and robbery with violence can carry the death sentence in Kenya.