The siege began when the attacker, identified as Abdilhakim Maslah, opened fire on his fellow officers, leading to a hostage situation. Police at first suspected the attacker had ties to the al-Shabab jihadist group.
According to the police, Maslah, a station guard, got off work Wednesday night but returned to the Kapenguria station shortly after 5am on Thursday and started shooting.
A separate police statement to the media said the officer, "for yet unknown reasons, went berserk and grabbed a firearm" and started shooting. The statement said the officer wore a "turban that covered his whole face, leading to the previous suspicions" that he was a terrorist.
Earlier, Police Inspector General Joseph Boinnet had said in a statement that commandos had surrounded the police station in an attempt to bring the standoff to an end.
"His attempts to escape were thwarted by quick arrival by other officers," Boinnet said.
Five police officers, including a senior officer, were among the dead, reports The Nation Kenya, quoting West Pokot County Commissioner Wilson Wanyanga.
KTN Kenya said as many as six officers had died in Kapenguria. Police commandos were deployed to rescue prisoners held at the station and end the standoff, Kenya's police chief, Joseph Boinnet, said before the crisis ended.
All but one of the officers killed worked at the station. The station commander was among them, West Pokot County Commissioner Wilson Wanyanga said.
President Uhuru Kenyatta condoles with the families and colleagues of the victims,
"Today, I mourn with the families of the young men who died in Kapenguria defending their nation against a depraved killer, he said in a statement.
"We do not know what led the killer to his foul and evil deeds, but Kenyans can be certain that my government's security and investigative agencies will do all within their power to discover what motivated this attack. I celebrate the lives of the young patriots who died defending the law and order we so often take for granted.
In days to come, my government will give their families every support as they come to terms with these tragic events. My family and I pray that God will grant them the grace to bear these losses. Kenya remains strong. This is a country of laws and order, not violence and hatred. We will not allow ourselves to be shaken, or to be divided by the foul deeds of a single man."