(CNN) -- Ahmed Shafik was Hosni Mubarak's last prime minister. Now he hopes to become Egypt's first democratically elected president.
Like Mubarak, Shafik is a former Air Force officer with close ties to Egypt's powerful military, "the quintessential candidate of the counter-revolution," in the words of Khaled Elgindy, a visiting fellow at the Brookings Institution in Washington.
But as Egypt prepares to choose its leader democratically for the first time in history, Shafik, 72, is trying to portray himself as a man of the people.
Egyptians head to the polls beginning Sunday for the second round of historic presidential elections.
His presidential campaign is using all the tools of the Internet age to get his message out, with a website, a YouTube channel, a Facebook page and a Twitter feed.
One of his many YouTube videos shows him dressed in a black T-shirt, meeting supporters and pinching the cheeks of a cute little boy. His campaign posters portray him in more professional attire, in a suit and tie, just a hint of an avuncular smile around his lips and the eyes behind his rimless glasses.
And his Facebook page shows off a photo of him as a young man with Egypt's President Anwar Sadat, who won a Nobel Peace Prize for making peace with Israel before he was assassinated for the historic outreach.
In the decades of Mubarak rule that followed, Shafik rose through the ranks.
As Egyptians rose up against Mubarak in January 2011, the man who had led the country so long he was nicknamed "Pharaoh" shuffled his government ministers one last time, promoting Shafik from civil aviation minister to prime minister.
Mubarak was toppled less than two weeks later, but Shafik remained in power for a few weeks longer, saying he and his government would report to the military council that took control of the country after Mubarak resigned.
Shafik himself resigned on March 3, 2011, after a brief effort to keep Mubarak and his allies from being prosecuted following their ouster.
As a result, Shafik is supported by many of those who lost out as a result of Mubarak's removal from power, said Omar Ashour, director of Middle East Studies at the University of Exeter in England.
His supporters include "the powerful ones, a collection of businessmen and generals," said Ashour, a visiting scholar at the Brookings Institution in Doha, Qatar.
Some members of the Supreme Council of Armed Forces may also back him "because he might maintain the status quo," Ashour said.
Shafik has been the target of particular anger from the Muslim Brotherhood, the country's venerable Islamic opposition movement that won the largest share of the seats in parliamentary elections after the revolution.
In April the Brotherhood called for a mass protest in Cairo's Tahrir Square, the symbolic heart of the Egyptian revolution, against the presidential candidacies of Shafik and Omar Suleiman, Mubarak's long-time head of intelligence.
Both were disqualified from running, but Shafik successfully appealed against the ruling.
CNN's Laura Smith-Spark contributed to this report.