A group allied with former President Donald Trump has set its sights on fellow Republican presidential contender Nikki Haley as she's climbed in the polls, most recently hitting her over past comments in which she said people should not call illegal immigrants "criminals."

On Wednesday night, the MAGA War Room, which is associated with MAGA Inc., posted a video clip of Haley at a 2015 Aspen Institute event where she made the remarks while serving as South Carolina's governor. 

"I think that what we have to remember, and I have always believed, is that we are a country of laws, that's what makes us strong," Haley said during the panel. "We have to always be a country of laws. So it's incredibly frustrating for a lot of people when they see the illegal immigrants being able to come across. It really is astonishing that after all of these years, D.C. hasn't figured out how to build a wall. It really is, after all of what they spend."

NIKKI HALEY'S BOOK CONFESSION ABOUT CHANGING HUSBAND'S NAME RESURFACES: 'HE LOOKS LIKE A MICHAEL'

"Having said that, we are a country of immigrants," she continued. "I am a proud daughter of Indian parents that reminded us every day how blessed we are to live in this country. They resent when people come here illegally. But let's keep in mind, these people that are wanting to come here, they want to come here for a better life, too. They have kids, too. They have a heart, too. So, we don't need to be disrespectful. We don't need to talk about them as criminals — they're not. They're families that want a better life, and they're desperate to get here. What we need to do is make sure that we have a set of laws that we follow, and that we go through with that."

AnnMarie Graham-Barnes, a Haley campaign spokesperson, fired back at the pro-Trump group, saying Haley has a history of being tough against illegal immigration.

"She passed one of the toughest anti-illegal immigration bills in the country in 2011 when Trump was still a Democrat," Graham-Barnes told Fox News Digital. "She has also said she has a different style and approach from Trump and doesn't always agree with his incendiary language. Trump should spend more time explaining why he never fulfilled his signature promise to build a wall instead of desperately trying to mislead voters with lies."

FIRST ON FOX: HALEY MORE THAN DOUBLES HER FUNDRAISING WITH A $24 MILLION HAUL THE PAST THREE MONTHS

Trump and Haley

Former President Donald Trump and Nikki Haley in New Hampshire. (AP)

GOP presidential rival Vivek Ramaswamy took to X on Wednesday to say that he "strongly disagree[s]" with Haley's position.

Haley signed an immigration law in 2011 requiring police "to check the immigration status of anyone they stop or arrest for another reason and suspect may be in the country illegally," Reuters reported at the time. 

Haley has faced fire from her Republican primary rivals on several issues, including her cozy relationship with China as the governor of South Carolina, and greater scrutiny from individuals in the media as she's risen in polls in recent weeks. 

Also on Wednesday, an excerpt from her 2012 book "Can't Is Not an Option" resurfaced in which Haley recounted how she modified how people refer to her now-husband, Michael Haley. The post racked up nearly 7 million views on X.

CLICK HERE TO GET THE FOX NEWS APP 

Haley has experienced momentum in the polls in recent months on the heels of well-received performances in the first three GOP presidential primary debates. She leapfrogged Florida Gov. Ron DeSantis for second place in New Hampshire, which holds the first primary and second overall contest in the Republican nominating calendar.

Haley also aims to make a fight of it in Iowa, where the latest polls suggest she is pulling even with DeSantis for a distant second place behind Trump, who remains the front-runner in the GOP nomination race as he makes his third straight White House bid.

Get the latest updates from the 2024 campaign trail, exclusive interviews and more at our Fox News Digital election hub.

Fox News Digital's Paul Steinhauser contributed to this report.