MOGADISHU (Reuters) - Somalia has criticized neighboring Kenya for deporting two Somali lawmakers and a minister after authorities in Nairobi blocked them from entering the country.

Senators Ilyas Ali and Zamzam Dahir and minister Osman Liban arrived at Kenya’s Jomo Kenyatta International Airport (JKIA) on Monday and were forced to spend hours there before being returned to Somalia on Tuesday.

In a letter seen by Reuters on Wednesday, Somalia’s ministry of foreign affairs protested their detention and deportation.

“Somalia is concerned that several members of the Somali government ... were detained by immigration officials, their passports confiscated, forcing them to return to Mogadishu,” the letter said.

It added that the actions risked hurting relations between the two and asked Kenya “to consider the potentially destabilizing impact of these actions and to uphold ... diplomatic norms in the spirit of reciprocity and mutual respect”.

Kenyan presidential spokesperson Kanze Dena did not immediately return a call from Reuters seeking comment.

Relations between the two nations have been tested in the past by security measures taken by Kenyan authorities to try to stop attacks by Islamist group al Shabaab that Somalis often complain are sweeping and amount to collective punishment.

Kenya hosts a large refugee and non-refugee Somali population. It is also a contributor of troops to the African Union (AU)-backed peacekeeping force AMISOM that helps defend Somalia’s central government from al Shabaab.

The Kenyan deployment in Somalia has in turn frequently been the target of retaliatory attacks by the militant group.

Gripped by insecurity and lawlessness since the 1990s, Somalia is eager to keep warm relations with neighbors, which the government sees as essential to its efforts to stabilize the country.

But Kenya and other neighbors also keep a wary eye on the Horn of Africa nation, eager to stop any potential spillovers of Islamist violence. Somalia and Kenya have also had maritime territorial disputes in the past.