MOGADISHU - Somalia has raised "great concern" with the Kenyan government, accusing it of detaining and confiscating the passports of Somali ministers trying to enter the country.

The Somali foreign affairs ministry contacted Kenyan authorities on Tuesday, in a letter authenticated by AFP, complaining about the treatment of MPs and cabinet ministers who were forced "to return to Mogadishu".

The ministry "notes with great concern the recent decision of the government of Kenya to restrict the issuance of entry visas", the letter said.

Somali radio reported that a deputy minister and two Somali senators, holding diplomatic passports, were barred from entering Kenya on Monday.

Monica Juma, Kenya's cabinet secretary for foreign affairs, on Tuesday declined to comment on the specific case but said visitors with valid visas would not be denied entry.

"I'd be very surprised if anybody was turned away with a visa," she said.

But one of the Somali senators concerned, Ilyas Ali Hassan, told AFP he and colleagues were barred from entering Kenya.

"I was personally coming from London and my colleagues from Mogadishu when we have become stuck at the Jomo Kenya Airport," Hassan said.

"This was actually quite confusing because we used to come to Kenya and never had similar experience," he added.

In the letter, the Somali foreign affairs ministry also raises concerns that Kenya has reinstated a mandatory stop at Wajir, near the border between the two countries, for a security check on all flights from Somalia.

The practice was discontinued in 2016.

Relations between Mogadishu and Nairobi deteriorated earlier this year after Somalia decided to auction off oil and gas blocks in a disputed maritime area.

Nairobi recalled its ambassador from Mogadishu in February in the row over which of the east African neighbours controls access to the lucrative deposits.

A disputed triangle of water, which stretches over an area of more than 100,000 square kilometres (40,000 square miles), is believed to hold valuable deposits of oil and gas in a part of Africa only recently found to be sitting on significant reserves.