ELDORET, Kenya (Reuters) - A gunman and a police officer were killed in an attack on the home of Kenya’s deputy president in the western town of Eldoret, a senior administrator said on Sunday, just over a week before a national election.

A view shows the home of Kenya's Deputy President William Ruto in Sugoi village near Eldoret, Kenya, in this photo taken August 4, 2010. REUTERS/Thomas Mukoya

Deputy President William Ruto and his family were not at home at the time of the Saturday attack, police said. Ruto is the running mate of President Uhuru Kenyatta, who is seeking a second and final term in office in the Aug. 8 election.

“From the exchange of fire we thought it was more than one attacker, because he used different firearms, but after we subdued him, we found only one man dead, plus our officer who he had killed,” Wanyama Musiambo, Rift Valley regional coordinator, told reporters at the scene on Sunday.

Musiambo declined to comment when asked about the motive of the attack, or the attacker’s identity. The deputy president’s residence is guarded by an elite paramilitary police unit.

Musiambo said the attacker initially had no gun but managed to break into the police armoury once inside the compound.

“After the operation we discovered that it was one gunman, but because he was inside there, he could change position and firearms because he had access to the guns. And the guns he was using were ours,” he said.

“We have however launched investigations into the issue, to find out if he conducted the attack alone or he was with others who may have escaped.”

Ruto and Kenyatta spent Saturday campaigning in the counties of Kitale, Kericho and Narok, the president’s office said in a statement.

“Condolences to the family of the gallant soldier Joseph Makembo, who died in line of duty and quick recovery to Allan Rotich,” Ruto said on Twitter, referring to the guards at his residence.

Late on Saturday, police had initially said the attacker was armed with a machete and had injured one police officer before holing himself up in an outbuilding.

A Reuters reporter near Ruto’s compound said he saw several police vehicles going in and out of the compound, as well as one armored vehicle in the compound.