During the first presidential debate, a record-breaking primetime television event viewed by over 84 million people worldwide, Hillary Clinton managed to get under Donald Trump’s skin by invoking two of his favorite pastimes: beauty pageants and unbridled sexism.

“One of the worst things [Trump] said was about a woman in a beauty contest. He loves beauty contests, supporting them and hanging around them,” said Hillary. “And he called this woman ‘Miss Piggy.’ Then he called her ‘Miss Housekeeping,’ because she was Latina. Donald, she has a name. Her name is Alicia Machado, and she has become a U.S. citizen, and you can bet she’s going to vote this November.”

Hillary was referring to the Venezuelan Miss Universe 1996, and the dig prompted Trump to not only double down on his comments about Machado’s weight on Fox & Friends the following day, but also unleash a Twitter tirade in the early morning hours Friday, urging the American voting public to “check out” Machado’s “sex tape” (she doesn’t have one) and look into her past, even though these have virtually no bearing on Trump’s fat-shaming of the former beauty queen.

Of course, Trump’s beauty pageant fetish isn’t limited to Machado. He owned the Miss Teen USA, Miss Universe, and Miss USA pageants from 1996 to 2015—when NBC and Univision severed ties with Trump’s Miss Universe Organization following his derogatory statements against Mexicans in his presidential announcement speech. Trump was ultimately forced to sell his ownership stake in the Miss Universe Organization to WME/IMG.

Trump would, according to testimony by former contestants and audio first obtained by TMZ, engage in a troubling practice while overseeing the Miss USA pageant. Dubbed “The Trump Rule,” the ex-reality host would oversee a pre-screening of the Miss USA contestants in revealing outfits and play his own personal game of Hot or Not, dividing the women into groups. He’d then demand that each beauty contestant name another contestant they felt was the most beautiful, and separate the contestants accordingly.

Listen to the audio of Trump implementing “The Trump Rule” here:

In the audio, first obtained by TMZ, Trump is heard salivating over the Miss USA 2009 contestants during a pre-screening. He orders them around by name, ogling them. He utters the word “beautiful” over two dozen times.

“West Virginia, West Virginia—get over here. Beautiful,” utters Trump. “I knew a girl from West Virginia once—she drove me crazy…I loved her. She had no makeup, no nothing. They didn’t know about makeup. You know, in West Virginia, they didn’t know about makeup, they didn’t know about cellulite. Just beautiful.”

Trump is then heard explaining “The Trump Rule”—and implementing it.

“As I told you, many of you have already been chosen—so it doesn’t even matter. But as the Miss Universe Organization and the Miss USA Organization, we get to choose a certain number,” he said. “You know why we do that? Because years ago when I first bought it, we chose ten people—I chose none. And I get here, and the most beautiful people were never chosen! And I went nuts!” “So we call it ‘The Trump Rule,’” he added. “It’s called The Trump Rule—and we get to choose.”

In Carrie Prejean’s autobiography Still Standing, the former Miss California USA 2009 and Miss USA 2009 runner-up described how, moments after meeting Trump, the Miss USA contestants were subjected to “The Trump Rule.”

“We were told to put on our opening number outfits—they were nearly as revealing as our swimsuits—and line up for him on stage. Donald Trump walked out with his entourage and inspected us closer than any general ever inspected a platoon. He would stop in front of a girl, look her up and down, and say, ‘Hmmm.’ Then he would go on and do the same thing to the next girl. He took notes in a little pad as he went along,” wrote Prejean. Then, recalled Prejean, Trump called all the women forward and proceeded to ask each one, “Tell me, who’s the most beautiful woman here?”

“In this way, Donald Trump made his way through all the girls,” Prejean wrote. “As he did, he motioned those girls he liked over to one side, leaving the discards to one side of the stage…It became clear that the point of the whole exercise was for him to divide the room between girls he personally found attractive and those he did not.” “Many of the girls found this exercise humiliating. Some of the girls were sobbing backstage after he left, devastated to have failed even before the competition really began to impress ‘The Donald,’” she continued. “Most of us respected Donald Trump as an amazing businessman and leader—and certainly I still do. But we naturally felt sorry for the girls who were left in the ‘reject’ line. Even those of us who were among the chosen couldn’t feel very good about it—it was as though we had been stripped bare.”

Prejean was eventually stripped of her title by Trump after risqué photos of the beauty queen emerged from a lingerie photo shoot, as well as—yes—a sex tape.