Minutes into the first Democratic debate of the 2020 presidential election, late-night host Trevor Noah said he suspected that “half of America thought they flipped to Univision by mistake.”

Why? Former Texas congressman Beto O’Rourke had suddenly started speaking Spanish.

In the middle of his opening answer to a question about marginal tax rates during the live broadcast from Miami on Wednesday night, O’Rourke seamlessly transitioned from English to Spanish, catching viewers and even some of his fellow candidates off guard.

While O’Rourke flexed his language abilities, a camera captured Sen. Cory Booker (D-N.J.) gawking wide-eyed. Next to Booker, Sen. Elizabeth Warren (D-Mass.) also openly stared, and soon the moment became a viral meme.

But amid the jokes, a more serious online debate was raging: When political candidates speak Spanish in public, is it a genuine attempt to connect with Hispanic voters or is it pandering?

The mixed reactions to what late-night host Stephen Colbert described as O’Rourke’s “linguistic surprise” highlights the cultural minefield politicians navigate when they choose to show off their language skills. Success could mean winning favor with a new demographic of voters, but flub the effort and the moment can quickly become a punchline.

It remains to be seen whether the Democrat’s Spanish efforts during the first debate will pay off, but that didn’t stop late-night comics and online commentators from mocking the attempts.

“He’s either trying to lock up the Hispanic vote or he’s running for embarrassing dad at a Mexican restaurant,” Colbert quipped about O’Rourke.

The last president who actually could speak a foreign language fluently was Franklin D. Roosevelt, who spoke French and German, McClatchy reported.

As the Hispanic vote has become a major factor in national elections, speaking Spanish on the trail has gained popularity among presidential contenders. During the 2000 election, George W. Bush and Al Gore sprinkled their rhetoric with Spanish phrases — an effort celebrated by some native speakers, while others accused them of “messing up our language,” the Houston Chronicle reported in October 1999.

“Al Gore speaks his scripted Spanish haltingly, with an accent so heavy that hearing him speak the language just might be funnier than listening to Pepe Le Pew speak English,” the Chronicle wrote. Bush, despite his history of using Spanish as governor of Texas, didn’t grade much better.

“Neither could be described as fluent,” the newspaper wrote.

Since then, true Spanish speakers have made waves in the race for the White House. In 2016, the pool of hopefuls included former Florida governor Jeb Bush and Sen. Marco Rubio (R-Fla.), both of whom are fluent.

Bush, whose wife is from Mexico, made headlines when he sat down with Telemundo for a 25-minute interview conducted entirely in Spanish. As the Atlantic reported, Bush was able to discuss “immigration reform, Cuban foreign policy and the Puerto Rican debt crisis with only a handful of minor word-gender mistakes” and an unavoidable “gringo accent.”

The issue of speaking Spanish was also at the center of a heated spat between Rubio and Sen. Ted Cruz (R-Tex.) during a Republican debate in February 2016, when the Florida senator accused his opponent of not being able to speak the language. Cruz, whose father is a Cuban immigrant, had been repeatedly criticized over his past admission that his Spanish is “lousy.” But instead of cowing to Rubio’s dismissive “he doesn’t speak Spanish” comment, Cruz responded instantly and, to the surprise of many, en español.

Now, with the 2020 election looming and studies finding that Hispanics could likely be the largest minority voting group, candidates vying for the Democratic nomination have tried to make their names known among the demographic. Since they launched their campaigns, Sen. Kamala D. Harris (D-Calif.); former HUD secretary Julián Castro; South Bend, Ind., Mayor Pete Buttigieg; and Booker, the New Jersey senator, have all made appearances on Univision, a Spanish-language network, Politico reported. Several presidential hopefuls have also created Spanish-language campaign websites with varying degrees of translation success, according to Politico.

On Wednesday, after O’Rourke’s head-turning moment, both Booker and Castro, the only Hispanic presidential candidate, slipped into Spanish to show that they too can speak the language to a certain degree.

“The situation now is unacceptable,” Booker said in Spanish as he addressed immigration. “This president has attacked and demonized immigrants. It’s unacceptable and I’m going to change this.”

Castro, like Cruz, has been open about not being fluent in Spanish, but he still started his closing statement by introducing himself, “Me llamo Julián Castro” and ending with “On January 20, 2021, we’ll say adios to Donald Trump.”

Though the contents of the candidates’ foreign-language answers were serious, much of the reaction was less so.

On CBS, Colbert joked, “There’s so much Spanish onstage, ICE is closing in. Get out of there!”

Meanwhile, Noah could barely contain himself over Booker’s expression, which has been interpreted as reflecting a range of emotions, from side-eye to confusion.

“You know that feeling, have you ever walked into an exam in school and you sit down and another student puts a protractor on the desk and you’re like, ‘What? We need a protractor?’ ” Noah said on Comedy Central. “That’s what that face was. Panic, absolute panic.”

In an interview with CNN after the debate, when Booker was asked by Anderson Cooper about giving O’Rourke “kind of amazing side-eye,” the senator laughed and said he couldn’t recall what was going through his mind at the time.

“I just knew he had laid a gauntlet down,” Booker said, adding that he had talked with Castro and “both he and I knew, as people who can speak Spanish, that now we were going to bring it as well."

But Booker’s Spanish didn’t escape its own round of jokes. The senator has previously said that he studied the language during an immersion program in Ecuador.

“He sounds like Arnold Schwarzenegger learning Rosetta Stone,” Jimmy Fallon cracked on NBC.

On social media, some commentators slammed Booker and O’Rourke for what one person described as “a gross pandering trick.”

“Real talk . . . just because you’re a Democrat and possess a Mediocre Spanish vocabulary . . . does not mean you should ever try to answer any question in Spanish,” Karamo Brown, who stars on the hit Netflix show “Queer Eye,” tweeted. “Latino people are not going to all the sudden vote for you just because you said ‘Hola.’ ”

For Seth Meyers, the abundance of Spanish during Wednesday’s debate meant only one thing.

“You just know everyone in tomorrow’s debate who doesn’t speak Spanish is going to spend the whole day cramming,” Meyers joked on NBC, referencing Thursday night’s event featuring 10 more presidential hopefuls.

And judging from at least two candidates, he wasn’t wrong.

“I need to learn Spanish by tomorrow night at 9,” author Marianne Williamson tweeted.

Businessman Andrew Yang offered a more blunt assessment of his Spanish-speaking abilities.

“My Spanish is terrible,” he tweeted.