NAIROBI (Reuters) - A knife-wielding man who police described as a criminal was shot dead outside the U.S. Embassy in Nairobi on Thursday after he attacked and injured a Kenyan police officer.

The motive was not immediately clear, but no U.S. embassy personnel were involved in the incident.

National police spokesman George Kinoti said an investigation had begun and said the man was killed by the police officer in self defense.

"It was a lone criminal who attacked a police officer," Kinoti told Reuters. "He was armed with a knife"

A U.S. Embassy spokeswoman confirmed there had been a "shooting incident" outside the mission, which is located in a heavily secured compound in the north of the capital.

"No embassy personnel were involved," U.S. Embassy spokeswoman Fiona Evans said, without giving further details.

Kenyan media said the police officer had been guarding one of the entrances to the embassy compound when he was assaulted.

(Writing by Edmund Blair; Editing by Kevin Liffey, Larry King)