Shafiq plans to run in the 2018 Egyptian presidential elections, challenging current President Abdel Fattah el-Sisi.

Former Egyptian Prime Minister Ahmed Shafiq is heading to Cairo after leaving the United Arab Emirates (UAE), according the Emirati state news agency.

The report by WAM on Saturday came shortly after Shafiq's lawyer said on Facebook that her client had been arrested at his home in the UAE and would be deported to Egypt.

Dina Adly also said in her post that all lines of communication with Shafiq, who has resided in the UAE for five years after losing the 2012 Egyptian elections to Mohamed Morsi, had been shut down since Friday.

According to WAM, Shafiq's family stayed behind in the UAE.

On Wednesday, Shafiq said in a video message that he had been blocked from leaving the UAE, hours after announcing plans to run in Egypt's presidential election next year against President Abdel-Fattah el-Sisi.

"I was surprised to know that I am prevented from leaving the UAE, for reasons that I don't understand and I am not willing to understand," he said in his statement.

"I reject any intervention in Egypt's affairs by preventing me from participating in a constitutional right and a holy mission to serve my country," added Shafiq.

"I call on the UAE leaders to order the lifting of any restrictions on my ability to travel."

The UAE's Foreign Minister Anwar Gargash later responded in a series of tweets, saying there was "no obstacle" to Shafiq's departure from the UAE.

"(Shafiq) took refuge in the UAE and ran away from Egypt after the results of the 2012 presidential election. We presented him with every facility and generous hospitality despite our severe reservations about some of his positions," Gargash said.

Shafiq was prime minister for one month in 2011, during that year's Arab Spring uprising.

After losing the closely contested 2012 election to Morsi, Shafiq fled to the UAE. He was placed on trial in absentia in Egypt and found guilty of corruption charges.

He was later acquitted, clearing his path for a potential return to Egypt.

On Friday, Egypt's Foreign Minister Sameh Shoukry said he sees no legal restrictions that could prevent Shafiq from running in next year's elections against Sisi.

"I see no reason why he should not run. I say that as a layman. I know he's had some issues with the judiciary. I am not sure whether those have been resolved or not," Shoukry said in a meeting in Italy.

"But in principle, he is free to represent himself to the electorate. As in any society, it's up to the electorate to decide."

Shafiq is not the only person planning to challenge Sisi in the presidential election. Khaled Ali, a prominent Egyptian rights lawyer, has also voiced his intent to contest the 2018 elections.