It was early July and the contentious news topic of the day, not unlike many days during the last six months, was a peculiar, early-morning tweet from President Trump.

Everywhere, people were pontificating about the doctored video Trump had shared at 8:21 a.m., showing him in a suit at a wrestling match, body-slamming and punching a man who had the CNN logo superimposed on his face. Alongside it he wrote: #FraudNewsCNN.

Now a CNN panel had been asked to analyze it.

The host first tapped political pundit Kayleigh McEnany, who had collected fame, more than 100,000 Twitter followers and a paycheck from CNN for committing, day after day, to vocalizing her die-hard defense of the president. For nearly two years, “Trump supporter” had been her official title. The network had given her a platform, but the billionaire-turned-commander-in-chief had given her an identity.

When faced with defending just one, would she choose boss or brand?

“You know, I think it was intended as a tongue-in-cheek, satirical video,” McEnany said right out of the gate. “Nothing serious.”

Another panelist, apparently exasperated, smirked and shook her head, which she’d let fall into her hands.

McEnany’s rationalization was in stark contrast to many others in the media landscape, including her CNN bosses, who said in a statement that “it is a sad day when the President of the United States encourages violence against reporters.”

Even so, McEnany kept defending Trump. It’s what CNN was paying her to do.

That ended Saturday, when the Trump surrogate abruptly announced she was leaving the network. On Sunday, she appeared in a video on Trump’s Facebook page, hosting a “Trump TV” segment called the “real news,” which critics have labeled propaganda. Then on Monday, the Republican National Committee named McEnany the party’s new spokeswoman.

“Kayleigh will be an integral part of our Party’s ongoing commitment to promoting the Republican message to Americans across the country,” RNC Chairwoman Ronna McDaniel said in a statement.

It’s similar to a role previously held by Sean Spicer, another Trump surrogate who rose to prominence as an unflinching defender of the president’s agenda as White House press secretary — a loyalty for which he was mercilessly mocked.

McEnany, a 29-year-old Florida native with an Ivy League education, has dealt with her own share of backlash in her pursuit of punditry prominence.

Although she became a known entity just a few years ago, when she first started defending Trump’s policies as he campaigned for the Republican presidential nomination, McEnany has been preparing for a role like this since college.

She studied international politics at Georgetown University’s School of Foreign Service and interned for Rep. Adam Putnam (R-Fla.) and later for the White House Office of Media Affairs during President George W. Bush’s administration. She studied abroad for a year at Oxford University in England and went on to study law at the University of Miami before transferring to Harvard University, where she graduated with a law degree in May 2016.

All the while, she was beginning to build her brand.

She worked as a producer for three years on Mike Huckabee’s show at Fox News before trying her hand as an on-air analyst. She appeared as a co-host on CNN’s “The Point,” and made appearances elsewhere with Megyn Kelly, Gretchen Carlson and on other Fox programs, according to a profile of her while she was still at Miami in 2014.

“The beautiful thing about media, law and politics is that they all feed into each other,” McEnany said at the time.

She said in the law school story that she first got involved in politics as a teenager, when she carried around a book of Ronald Reagan quotes. Her on-the-job training on TV mixed with her legal schooling to make her think more critically, McEnany said.

“Writing really hard-hitting questions in media has helped me ask critical questions while studying law. I believe the facts should lead you to your conclusion,” she told the publication. “However, with ideologies, people tend to reach conclusions that are not necessarily supported by the facts. My law professors have gotten me to question my views on issues I had preconceived ideas about.”

But in her work on TV in the last two years, McEnany at times has offered some nonsensical defenses of Trump’s behavior and policies, putting her at odds with many of her co-panelists at CNN, creating an atmosphere once described as “Survivor: CNN Edition.”

That is exactly what her old network bosses intended.

In a New York Times profile, CNN President Jeff Zucker said his cast of pro-Trump panelists were “characters in a drama.”

“Everybody says, ‘Oh, I can’t believe you have Jeffrey Lord or Kayleigh McEnany,’” Zucker said, with what the Times described as “some satisfaction.”

“But you know what?” Zucker continued, “They know who Jeffrey Lord and Kayleigh McEnany are.”

In July 2015, McEnany was initially skeptical of Trump, telling CNN’s Don Lemon that in light of Trump’s comments calling Mexicans “rapists” and “criminals,” she hoped the candidate would “tone it down.”

“We can’t afford to have another Todd Akin on the campaign trail,” she said, referring to the former Missouri congressman who lost his bid for Senate after remarking that “legitimate rape” rarely causes pregnancy because “the female body has ways to try to shut that whole thing down.”

But just six months later, McEnany wrote a fawning endorsement of Trump for president in a Daily Caller column, kick-starting what would the beginning of a headfirst dive into the world of Team Trump. In July 2016, she quoted that endorsement for a commentary on CNN called “Why I am backing Donald Trump.

A year later, McEnany’s doggedness has seemed to pay off. Her candidate is now the president, and she is his party’s official mouthpiece. In what Breitbart News branded as an “exclusive first interview” with McEnany after she joined the RNC, she reflected on her role at CNN as a Trump supporter “trying to break through the narrative that was being sown.”

“What I’ve found is, going into the RNC, we are together,” McEnany told Breitbart. “What ‘together’ means is standing behind this president full throttle.”

Correction: A earlier version of this story misstated the number of McEnany’s Twitter followers. She has more than 100,000. This version has been updated.