“It was a combination of highly miraculous things,” Palmares said about her eight minutes of fame in the 4,700-seat Resorts World Theatre on Saturday night at Perry’s “Play” concert, after the pop star and “American Idol” judge interviewed Palmares about her family’s New American Dream Foundation. “It was divine confirmation that we’re on the right path and we have to just keep going.”

“First of all you are an incredible person,” Perry said to Palmares on a stage full of backup dancers and colorful props. “And despite all your obstacles you worked this thing. I can’t imagine what you do for others.”

Emanuela Palmares, left and Katy Perry after a July 29 concert in Las Vegas.

It would have been enough for Palmares to celebrate her 40th birthday with her husband and her 11-year-old son as far away from the stage as possible in the fourth balcony — because of the sensory hypersensitivity of her child’s autism, and because of Palmares’ own need for extra space to get up out of a seat. Since her multiple sclerosis diagnosis in 2022, Palmares has developed a nerve disruption known as foot drop in her right ankle that causes her to wear a brace.

But as it turned out, Palmares was touched by an invitation to donate to Perry’s charity to help underserved middle school kids access the arts, and when Palmares did so, she was entered into a contest to join Perry on stage after the show.

The next thing Palmares knew, an animated Perry, a bit breathless from the last number, was asking Palmares questions on stage, seemingly more impressed with each answer Palmares gave.

“You look like you belong on stage,” Perry said to Palmares, looking her up and down as the lively crowd roared. “What do you do in Connecticut?”

“I run a foundation to help immigrants,” Palmares said.

At this, the crowd cheers and Perry claps as best she can with a microphone in her hand. “What’s the name of that foundation?”

“The New American Dream Foundation,” Palmares says. “It was started by my parents.”

“I cannot believe it,” Perry said, putting her arm around Palmares. “This is so incredible. This is not a coincidence.”

Then after Perry noted that her charity and Palmares helped meet similar needs, Perry got serious with the loud Las Vegas crowd.

“You do great work, but can you do great twerk?” Perry said, looking down at the brace on Palmares’ right leg. “What happened?”

“I have multiple sclerosis, so…I’ve got foot drop,” Palmares said. “But not my hips.”

“Oh yeah,” Perry said. “You still got those hips, baby,”

And that’s how Palmares wound up throwing off her jacket and strutting in a sleeveless top across Perry’s concert stage to the delight of the Saturday night crowd.

Palmares posted the eight-minute cell phone video shot by her husband on Tik Tok, Instagram and Facebook.

Where did that pop star instinct to fling her jacket and strut come from?

Perry herself.

“(Perry) said ‘Take the blazer off, OK? Do it for the foundation,’” Palmares said on Monday during an interview from a Las Vegas hotel.

Palmares’ family foundation, the philanthropic branch of the family’s Tribuna Newspaper, began a hot meal program during the scourge of COVID-19, delivering 35,000 dinners to struggling families. In April, the foundation branched out in a partnership with the nonprofit Connecticut Institute for Communities in downtown Danbury to “connect immigrants to existing resources in our community.” Since 2016, the foundation has awarded more than $70,000 in scholarships to students.

While Palmares was “bringing it” for her family and her foundation on Perry’s stage, Palmares said she was also putting multiple sclerosis on notice — that the same disease her mother has been battling since 2005 was not going to rob Palmares of who she is.

“I’m not going to let MS take the part of me that makes me me, which is my energy,” Palmares said. “I won’t let it take that. I can still be myself — just a different version.”

As for her eight minutes of fame, Palmares credits that to an artist with a good heart she has always admired.

“So many people have asked me if this was a set up,” Palmares said about getting called onto Perry’s stage Saturday night. “But I only donated $40. She is just a really cool human.”