Omar al-Bashir, the president of Sudan, has returned from Eritrea following his first trip abroad since the International Criminal Court (ICC) issued a warrant for his arrest.
State television showed pictures of al-Bashir returning to Khartoum, the Sudanese capital, after the one-day visit on Monday.
Issaias Afeworki, the Eritrean president, had invited al-Bashir on March 11 to express solidarity with him, one week after the ICC in The Hague accused him of abetting crimes against humanity and war crimes in the western Sudanese region of Darfur.
"The drama being orchestrated by the so-called ICC amply demonstrates the anti-people stance and defamatory conspiracy on the part of external forces," the Eritrean government had said in its invitation.
Al-Bashir's visit to Eritrea had not been announced in the Sudanese media. Even those close to the government were unaware of his travel plans.
Fatwa against travel
The president's decision to step out of Sudan came after a group of influential Islamic scholars advised him not to travel to an Arab League summit in Qatar.
The scholars from the Sudan Ulema Authority issued a fatwa, or Islamic legal ruling, on Saturday saying it was "impermissible for you [al-Bashir] to travel for this mission, which others can do in your place".
"From a sharia [Islamic law] standpoint, you must not travel abroad," the scholars said in the fatwa.
The government is not bound by rulings from the Ulema Authority, but the body of scholars is widely respected in Sudan.
Al-Bashir is scheduled to travel to Qatar on March 30 for a summit set to focus on the situation in the western region.
Senior Sudanese officials have also released statements in recent days raising questions over the wisdom of travelling abroad.
Before the authority issued its statement, Mahjoub Fadul, the Sudanese presidential spokesman, told the Reuters news agency security arrangements had been put in place in case al-Bashir did make the journey.
Neither Eritrea nor Qatar is a member of the ICC and would have no legal obligation to arrest al-Bashir if he entered its territory.
Amr Mussa, the Arab League secretary-general, said last week that the 22-nation group would not act on the arrest warrant.
Luis Moreno-Ocampo, ICC's chief prosecutor, told Al Jazeera earlier that al-Bashir risks arrest if he travels abroad, though the court has no enforcement apparatus of its own.
"Once president al-Bashir leaves Sudanese territory he could be taken into custody," he said.
International experts say at least 200,000 people have been killed in Darfur and more than 2.7 million driven from their homes in almost six years of fighting.
Khartoum disputes the figures and says 10,000 people have died.
The conflict began when rebels took up arms against the government saying their region was being marginalised.