When Donald Trump announced that he was running for president, he did not humbly ask for voters’ support or pitch himself as a man of the people. Instead, he descended from a golden chamber, waving to his would-be subjects during an extended escalator ride, then promised to take charge of America and single-handedly fix everything plaguing it. He also called Mexicans rapists.

For political reporters and D.C. strategists, this rollout was a laughably bizarre and unprecedented production. But for the many, many millions of Americans who got to know Trump through his long-running NBC reality show, The Apprentice, it was a familiar scene: The cocksure billionaire mogul swooping in to deliver blunt dictums, impose his will, and focus his business acumen on a problem. The sole difference was the nature of the problem: Branding resorts had been replaced with the failures of representative democracy. Now, as Trump prepares to move into the less opulent environs of the White House, The Apprentice offers a means of understanding what half of the nation saw in a man with no political qualifications and a lifetime worth of gilded skeletons in his closet.

“The persona that he rode to victory in the election was one that was established on The Apprentice,” says Professor Robert Thompson, a professor at Syracuse University’s Newhouse School of Public Communications and the founding director of its Bleier Center for Television and Popular Culture. “It’s this idea of a guy that just plows in there and gets it done and makes decisions and is decisive and doesn’t really care what you think. And that persona had a certain appeal, both on The Apprentice and to an awful lot of voters.”

In order to create that character, the show emphasized Trump’s supposed wealth, often exaggerating it for dramatic effect. This was relatively easy for the network, as Trump had already functioned as the pop culture stand-in for opulent billionaire, having appeared on TV shows like Fresh Prince of Bel-Air and films like Home Alone 2. While those roles were inherently self-deprecating, his part on The Apprentice leaned on the premise that yuppies — and celebrities — wanted nothing more than to work for a man who spent the eighties and nineties leading several companies into the muck of bankruptcy.

“That show really emphasized in the way it was directed, the way it was shot, in everything, that he was the boss,” Thompson said. “When they went to the boardroom, he was the guy who had the ability to say, ‘You’re fired.’ He was the guy who could shut you up if he didn’t want to listen anymore.”

Trump played his role well and did it constantly. When he insisted on the campaign trail that he would, despite all international diplomatic norms, single-handedly reverse trade deals with China that might hurt working American families, make Mexico pay for a border wall, and punish Wall Street, his followers took him at his word. After all, the show painted him as an unbelievably powerful man. He even used his famous catchphrase, “You’re Fired,” during the campaign, yelling it at President Obama, who was both term-limited and not subject to Trump’s declarations. The crowd went wild for it, anyway.

“Whenever the winning team would get their rewards on The Apprentice, they would meet and Trump would come in, often times in a helicopter or a limo,” Thompson said. “In the pilot, the winning team got to go to his fabulous gold-plated apartment. That show did everything it could to emphasize the almost regality of Trump.”

More generally, the format of reality TV, now dominating American airwaves for a second decade, also helped lay out Trump’s path to the White House. He held massive rallies and peppered his speeches with trash talk, assigning a litany of schoolyard nicknames to his primary opponents and political rivals. There was “Little” Marco Rubio, “Lying” Ted Cruz, Elizabeth “Pocahontas” Warren, and “Crooked” Hillary Clinton, each branded with a third grade moniker that would have shocked the Founding Fathers. But those simple broadsides clearly delighted viewers, who had grown accustomed to elbows-out competition as televised entertainment. Trump had not come to make friends.

“He has an over-the-top style that has elements of gamesmanship, which violates political decorum but not standards of reality TV decorum,” Mark Andrejevic, a professor at Pomona College who has studied reality television for years, told Inverse. “Once that frame encompassed his campaign, he could use it in his favor.”

Trump, wittingly or not, was seen by many as a political version of a favorite reality show character trope: the anti-hero who is willing to do whatever it takes to win. The personality was pioneered by the duplicitous and deliciously evil Richard Hatch, who became a sensation when the first season of Survivor captured the nation’s attention during the summer of 2000. Both in competition shows, and even in shows such as those in The Real Housewives franchise, the most interesting characters are the nasty ones, those who play the game and their co-stars with a ruthlessness that shines on camera and makes for excellent television.

On these shows, the spoils go to the victor — often after a vote — and, in that way, Trump seemed like a winner. The fact that he’d left decades’ worth of unpaid bills in his wake was irrelevant or, viewed from a different angle, further proof of his guile.

“Reality TV is not about building a society, it’s about beating everybody else, Andrejevic says. “So what Trump was successful at doing was getting rich enough to have a fancy mansion and private jet, regardless for what that meant for other people involved. He still came out ahead, and so it had that kind of logic of the selfish survivor that characterizes so many of our reality shows.”

Even those who did not agree with some of his more extreme policy proposals — among them, jailing and deporting millions of undocumented immigrants — were able to buy into the reality TV context that framed his candidacy.

“People would say, ‘We know it’s not really real. It’s all a show. He’s just doing what he needs to in order to win,’” Andrejevic says. “Journalists would ask his supporters, ‘Do you really want to build a wall and deport people?’ And they’d say, ‘He’s just saying what he needs to say. He’s not going to do it.’ He was able to have people not take his policy seriously because they thought he was doing it in order to win.

Still, it seemed as if his candidacy was sunk when dozens of women began coming forward and accused him of sexual assault, making claims bolster by audio of him describing himself doing as much. But Trump was able to move past his conversation with Billy Bush, who was fired from NBC, by gaming his own media coverage. The fact that he was playing character seemed to inoculate him against legitimate character attacks.

“He made the calculation that the relatively low level of respect that certain sectors of the population for the media industry itself played in his favor,” Andrejevic suggests. “He got lots of free air time, and then he could use them as an example of the ‘elites he was upsetting, helping his credentials as someone who can bring about change.”

Running a campaign and actually governing a country are two very different beasts, of course, and it remains to be seen whether Trump will be able to play the character once he’s actually dealing with the day-to-day business of overseeing the world’s most powerful nation. The facts and news events to which he will need to respond will not be theoretical exercises or scenes out of reality TV. Still, the partisan factionalization of news may allow Trump to continue to frame his actions as gamesmanship on behalf of America.

“The thing about reality TV is that it’s not really real, and people are treating politics like it’s not really real,” Andrejevic said. “I think that recognition will come eventually. Unless it turns out that simultaneously he’s a really skilled politician. Who knows? Maybe we’ll all be lucky, and it’ll happen.