(NEW YORK) -- Republican presidential candidate Nikki Haley made a surprise cameo during "Saturday Night Live"'s cold open, mocking a fictional "Donald Trump," played by cast member James Austin Johnson, and joking about her past controversy talking about the Civil War.
The roughly two-minute appearance during a parody of a CNN town hall culminated with actress and comedian Ayo Edebiri, the episode's host, zinging Haley for her past comments in which she initially failed to name slavery as a main cause of the Civil War.
Introduced in the sketch as a "concerned South Carolina voter," Haley delivered several quips as she went back and forth with Johnson's version of Trump.
She began by asking the caricature of the former president, "Why won't you debate Nikki Haley?" -- jabbing at the real-life Trump's decision not to debate because of his large lead in the GOP primary race over her.
"Trump" then exclaimed, "Oh my god, it's her, the woman who was in charge of security on Jan. 6, it's Nancy Pelosi." It was a callback to a recent gaffe by Trump in which he appeared to confuse Haley for the former speaker of the House at a campaign event.
"Donald, you might need a mental competency test," Haley retorted.
"Trump" then said that he "took the test, and I aced it."
"Perfect score. They said I'm 100% mental," he joked.
"And I'm competent because I'm a man. That's why a woman should never run our economy. Women are terrible with money. In fact, a woman I know recently asked me for $83.3 million," he added, a nod to the damages won by writer E. Jean Carroll from a New York civil jury after Trump was found to have defamed her after she said he sexually assaulted her, for which he was also found liable by a jury.
(He denies that and has vowed to appeal.)
In response to "Trump" making a joke about the "Sixth Sense" and claiming, "I see dead people," Haley joked on "SNL": "Yeah, that's what voters will say if they see you and Joe [Biden] on the ballot."
And when "Trump" said that he was going to beat her in South Carolina, Haley asked, "Did you win your home state in the last election?"
But it was Edebiri, one of the stars of FX's "The Bear," who, at the end, poked fun at Haley.
"I was just curious, what would you say was the main cause of the Civil War? And do you think it starts with an 'S' and ends with a 'Lavery,'" Edebiri asked, playing a member of the town hall audience.
"Yep, I probably should have said that the first time," Haley said, smiling, before segueing into the show's signature intro.
Posting about her appearance on X afterward, Haley wrote that she "had a blast" on the show.
"Know it was past Donald's bedtime so looking forward to the stream of unhinged tweets in the a.m.," she added.
The late-night appearance comes as she is preparing to face Trump in South Carolina's Republican primary, the next contest in the race for the GOP presidential nomination.
Haley, a former South Carolina governor, recently made headlines for what she said about the Civil War.
At a December town hall, she initially did not mention slavery as one of the main causes of the conflict -- instead saying the war was about "basically how the government was going to run" and "freedoms and what people could and couldn't do."
Haley soon walked back her initial answer and has repeatedly called the response a mistake on the campaign trail.
Appearing last week on "The Breakfast Club" radio show, Haley said that she was "too busy judging" the questioner's "intentions then I was just answering the question. And it was a mistake."
"Slavery should have been the first thing that came out of my mouth," she said.