Egyptian President Abdel Fattah al-Sisi landed in Islamist neighbour Sudan on Friday for what an analyst said would be an attempt to shore up a regional alliance against Islamic "terrorism".
An AFP photographer at Khartoum airport confirmed the Egyptian leader's plane had touched down.
The official SUNA news agency said Sisi was "on a short visit to hold talks with President (Omar) al-Bashir."
About 300 Islamists protested the visit outside a downtown Khartoum mosque, a witness said.
Sisi arrived a day after he told the African Union summit in Equatorial Guinea that the continent must reinforce cooperation to face a "plague" of cross-border terrorist groups.
He took a similar message to Algeria on Wednesday during his first foreign trip since his election in May.
"Egypt, the Gulf countries and now Algeria -- Egypt is trying to build a regional alliance to fight Islamic terrorism," University of Khartoum political scientist Safwat Fanous told AFP.
"So they would like to see Sudan as part of this alliance in order to isolate Qatar and Turkey, who are... the main supporters of the (Muslim) Brotherhood Movement."
Egypt jointly ruled Sudan with Britain until 1956.
Sisi, while he was still army chief, toppled Islamist president Mohamed Morsi last July. Sisi then won the May presidential poll by a landslide after crushing the opposition.
Egypt designated Morsi's Muslim Brotherhood movement a terrorist organisation in December and its members have been subjected to a crackdown which has left more than 1,400 people dead and at least 15,000 jailed.
Saudi Arabia also declared the Brotherhood a "terrorist" organisation, and it is banned in many Gulf countries.
- Sudan economically isolated -
Before his ouster, Morsi visited Sudan in a visit which President Bashir's office hailed as "historic".
Bashir's 25-year-old regime relies on a base of support which is essentially the same as the Muslim Brotherhood, although it does not use that name.
Sudan is close to regionally-isolated Qatar, which was accused of backing groups like the Brotherhood.
Qatar's emir Sheikh Tamim bin Hamad Al-Thani visited Sudan in April and pledged $1 billion (730 million euros) to help boost cash-strapped Khartoum's hard currency reserves.
But Khartoum's ties to Doha do not preclude its rejecting advances from Sisi, Fanous said.
"In politics there are no permanent friends, nor permanent enemies," he said. "I think it all depends on who will benefit the regime better."
Sudan has a debt of more than $40 billion, much of it in arrears, and has been under American sanctions since 1997.
Adding to the country's isolation, diplomatic and other sources said in March that major European and Saudi banks had stopped dealing with Sudan.
The country has been plagued by inflation, a declining currency and lack of reserves since South Sudan separated three years ago with most of Sudan's oil production.
Egypt's political turmoil that began with the ouster of longtime autocrat Hosni Mubarak in 2011 has had a ruinous effect on its economy, although Gulf states have pledged billions in support for Cairo since Morsi's ouster.
Sisi, however, is unlikely to have any financial aid to offer Sudan.
"But he may mediate between Sudan on the one side, and the West and the Gulf countries on the other side," to ease economic pressures on Khartoum, he said.
"Sisi must have something to offer Bashir if he expects Bashir to cooperate," the professor added.
On another issue, Fanous said Sisi likely wants Sudan's help to mediate a dispute with Ethiopia over the Grand Renaissance dam under construction in that country.
Egypt has expressed particular fears that the dam project could diminish the supply of Nile River water on which it is almost entirely dependent.
The 6,000 MW dam will be Africa's largest when completed in 2017.