NAIROBI (Reuters) - A Kenyan man who pleaded guilty to a grenade attack in the capital earlier this week and membership of Somali Islamist group al Shabaab was sentenced on Friday to life in prison by a Nairobi court.

Elgiva Bwire Oliacha, also known as Mohamed Seif, told reporters he had no regrets after a magistrate read out the life sentence for the grenade attack.

He was given another 15 years for al Shabaab membership and seven years for the illegal possession of grenades and guns.

"The offence is serious and aimed at killing and a deterrent sentence is called for," Magistrate Grace Macharia told Oliacha, who sat unflustered in the dock.

Nairobi was stunned by two grenade attacks at a bar and a bus terminus that killed one person and wounded more than 20 on Monday, two days after the U.S. embassy had warned of an imminent threat in Kenya.

Kenya sent troops into Somalia 13 days ago to fight the Islamist rebels, blamed by Nairobi for a series of kidnappings on Kenyan soil and frequent border incursions that threaten the east African country's security.

Earlier in the same court, prosecutors charged two more suspects with the same crimes as Oliacha, including the grenade attack at the bus terminus.

Omar Muchiri Athuman and Stephen Macharia Mwangi denied being involved in the grenade attack, being members of al Shabaab or illegally possessing guns and grenades.

The court remanded them in custody until November4 when they will return before the magistrate. No one has been charged with the other grenade attack at the bar.

(Reporting by Humphrey Malalo; Writing by Duncan Miriri; Editing by David Clarke)