As the exit polls from the first round of the Tunisian presidential election emerged, a video from 2013 went viral. It showed the inside of a radio studio, its walls shaking as if hit by an earthquake. A journalist clutches the table before backing against the wall to steady himself. There is screaming. But the guest, the newly elected president of Tunisia, Kais Saied, barely flinches. He sits there, stony faced. Then he checks his watch.

Such composure when faced with this fake disaster, a hidden camera prank played on a number of Tunisian public figures during Ramadan, made an impression. “They could do that with a thousand politicians and no one would react like Kais,” says Khayreddine Debaya, a 30-year-old engineer and Saied evangelist. The reaction of many viewers was less “you got punked” and more, as Debaya put it, that this was “someone intelligent who reacts quickly and analyses situations”. The cult of “Robocop”, as this charmless populist has become known, grew stronger.

In a prophetic viral video that has 137,000 views, shared on Facebook two days before the second round of voting, Saied’s head is superimposed onto the body of the classic computer-game character Super Mario as he charges his way to victory, jumping on the heads of his rivals and powering up thanks to a magic mushroom captioned “les jeunes” (the young). It wasn't a surprise that in the final round of voting he won 90% of the votes from 18 to 25-year-olds. Taking 73% overall, Saied – not long ago a political outsider – trounced his opponent, Nabil Karoui, a media mogul. He owes a portion of his success to viral videos such as these. Despite his awkwardness and digital illiteracy, or perhaps because of it, Saied has been catapulted to power by a youth movement fuelled by an anarchic grassroots social-media campaign.

Songs from the revolution echoed through the capital when the results dropped. The landslide result was a rejection of Tunisia’s ruling elite and a rebuke to the governments that have led the country since Zine El Abidine Ben Ali, the dictator who ruled from 1987 to 2011, was ousted. Since then, governments have failed to deliver meaningful change: corruption is endemic and the economy has faltered. Karoui, who spent much of his election campaign in jail waiting for a verdict in his trial for money laundering and tax evasion, is seen as corrupt and linked to the old regime. Saied, who has no political party, is outside the system. Tunisian flags adorned the main avenue. Fireworks went off and car horns honked. In front of the municipal theatre leftists, Islamists and first-time voters belted out slogans from the 2011 uprising, football chants and the national anthem. The euphoria on the street made up for the lack of joy in Saied’s glassy grey eyes.

Paint the town red Supporters of Kais Saied celebrate in central Tunis

The 61-year-old, non-partisan, socially conservative law lecturer has become a cult figure among young people in Tunisia. He stands straight as an arrow and speaks his own version of classical Arabic, instead of the usual Tunisian dialect. Though Saied never completed his doctoral thesis, fans refer to him as “the professor”. His frugal campaign and painfully monotonous demeanour add to his aura of incorruptibility. Saied first engaged with politics at the Casbah sit-ins, a mass protest after the revolution which ousted the interim government made up of ministers from the old regime. In the years that followed, he quietly travelled around the country to join protests and youth gatherings, and to chat to people in cafés about his vision of a decentralised Tunisian state. People would often suggest that he run for president.

Even before his electoral success, “Kais Saied” had become online shorthand for moral authority, thanks to his TV interviews about the post-revolution constitution. “You might have a debate between two people and someone will post a picture of Saied to stop the debate and say that he is right,” says Nader Mathlouthi, a blogger in Tunis. Another recent meme consists of photos of Said’s face each labelled with with a different emotion: “happy”, “sad”, “angry” and “high”. Hecham Khabouba, a 19-year-old student, loves him. “Weird people are sometimes cool,” he said.

Facebook fodder A meme featuring Kais Saied

But the keyboard activists were also serious and organised. Many Facebook groups both secret and open to the public encouraged support for Saied, who doesn’t even have a Facebook account himself (though he says he uses Google sometimes). Kooora Tunisie, which has 229,000 followers, started out as a page for football fans (koora means football in Arabic). The group became politicised at the time of the revolution before being mobilised in support of Saied. Members of The People’s Campaign to Support Kais Saied group, which boasts 34,000 followers, share motivational messages, clips that denigrate his opponents and earnestly Photoshopped images. One shows Kais Saied floating above the Tunis skyline surrounded by a heart drawn in the sky by an aeroplane. The groups also serve a practical function. In one, a post organising car shares to take young people back to the towns where they are registered to vote was shared over 7,000 times by the eve of the election. The scale and power of this online army was demonstrated when a boycott campaign resulted in the Elhiwar Ettounsi TV channel losing 1m followers from its Facebook page in a matter of hours after the owner insulted Saied.

The same digital groups that helped overthrow Ben Ali gave Saied a hand too, says Bader Ben Mansour, a scholar of political communications at the University of Laval. Digital social movements have bolstered radical leaders elsewhere. Online communities and groups set up around Occupy Wall Street have supported one of the candidates for the Democrat presidential nomination, Bernie Sanders. In Spain there was an organic link between the Indignados (anti-austerity) movement online and left-wing Podemos campaign. Though politically they differ greatly, the memes that affectionately mock Saied are evocative of the fandom that developed around the Labour leader Jeremy Corbyn among young people in Britain.

Some of Saied’s young supporters are concerned about his socially conservative views. He has opposed the legalisation of homosexuality and equal inheritance rights for women. Debaya, who is also active in human-rights organisations, acknowledges this is a concern. “Kais isn’t perfect and no one represents you 100%,” he says. “It will be our role after the election as activists [to fight for individual rights].” LGBT groups have voiced stronger criticism. Mounir Baatour, who campaigned as Tunisia’s first openly gay presidential candidate and is the founder of the LGBT organisation Shams, has described Saied as a “dangerous person for our community”.

Once in office Saied will have constitutionally limited powers. Most decisions regarding domestic affairs are taken by parliament where he has no party and could easily become isolated. For his detractors and voters for whom the new president was simply the lesser of two evils, this comes as a relief. But his supporters fed up with the establishment are hoping for a revolution.