Kenya's foreign minister has held talks with Sudan President Omar al-Bashir to defuse a diplomatic row touched off by a Kenyan court's order that Bashir be arrested for suspected genocide if he sets foot in Kenya.

Sudan has threatened to expel Kenya's ambassador and pulled its own envoy out of Nairobi after a Kenyan judge told the Nairobi government to detain Bashir if possible and hand him over to the International Criminal Court in The Hague.

Since Monday's ruling, Kenya has tried to ease the spat with Sudan by saying it will appeal against the court's decision. Khartoum has said it is open to a diplomatic resolution and has yet to enforce the Kenyan ambassador's expulsion.

Kenyan Foreign Minister Moses Wetangula met Bashir in Khartoum on Thursday to try to resolve the stand-off.

We are leaving here quite satisfied that Kenya and Sudan are close friends, and close friends they will remain, he told reporters in Khartoum after the meeting.

Patrick Wamoto, a senior Kenyan ministry official, earlier told Reuters: Our ultimate aim is to have diplomatic relations restored even before the appeal case goes through.

He said the appeal process could take a year or more but diplomatic relations could be fully restored quickly if Wetangula succeeded in reassuring Bashir that the government was not involved in the court ruling.

(It) took us by surprise. We are not at war with Sudan. We have not quarrelled. From where we sit, the question of immunity for a serving head of state is uncontested. This will be the gist of the appeal, he said.

Kenya was heavily criticised by the ICC and foreign governments for failing to arrest Bashir when he attended a ceremony to enact a new Kenyan constitution in August last year.

Nairobi was adhering to a stance taken by the African Union, which had told its members not to enforce the ICC's arrest warrant against Bashir because the ICC seemed to be singling out African leaders.

The AU says another reason for its opposition to the ICC indictment of Bashir is the negative impact this would have on Sudan's peace process in its troubled Darfur region.

As an ICC member state, Kenya is legally obliged to cooperate with the court and its arrest warrants. Monday's court ruling put the government in an awkward position because it is also committed to the regional position of not arresting Bashir.

In Khartoum, Sudanese foreign ministry spokesman El-Obeid Morawah said Kenya's ambassador was still in Khartoum and Sudan's ambassador still in Nairobi. Khartoum would make its final decision about the expulsion after the meeting between the Kenyan foreign minister and Bashir, he said.

We slowed down our process until (then). Our final decision will be taken after this meeting.

Nairobi and Khartoum have solid business ties - Kenya imports sugar from Sudan, which buys tea from Kenya.

Also at stake if Nairobi were to let the court order stand is their relationship in the east Africa regional bloc IGAD. Kenya provided considerable help in mediating an end to north-south civil war in Sudan.

(Additional reporting by Alexander Dziadosz in Khartoum; Writing by James Macharia; Editing by Duncan Miriri)