NAIROBI (Reuters) - Al Shabaab militants attacked a remote police outpost in northern Kenya on Thursday and killed an officer days before national elections, police said.

A major attack could undermine the security credentials of President Uhuru Kenyatta who is standing for a second and final term at elections next Tuesday when the country will also vote for members of parliament and regional authorities.

The attackers hit two vehicles when they fired rocket propelled grenades at the camp in Lafey village near the border with Somalia before police repulsed the attack, said Joseph Boinnet, inspector general of police.

“We have lost one officer and on the enemy side we have reason to believe that there were some casualties,” Boinnet told a news conference, adding that the attackers fled with a government vehicle. Al Shabaab claimed responsibility for the attack.

Al Shabaab is fighting to overthrow Somalia’s western-backed government and establish its own rule, based on the group’s strict interpretation of Islamic sharia law.

The Islamists frequently launch attacks in Kenya in a bid to force the country to withdraw its troops from Somalia. Kenyan troops form part of the African Union-mandated AMISOM peacekeeping force, which defends Somalia’s government.