Vice President Kamala Harris on Monday issued a tough warning to potential migrants, telling them "do not come" to the U.S. and warning that she believed they would be turned back -- a stark contrast to a more welcoming message she had issued in past years.

"I want to emphasize that the goal of our work is to help Guatemalans find hope at home, at the same time I want to be clear to folks in this region who are thinking about making the dangerous trek to the United States-Mexico border -- do not come, do not come," she said in Guatemala.

FLASHBACK: HARRIS PROTESTED AT SOUTHERN BORDER IN 2018, BUT HASN'T VISITED SINCE TAKING MIGRANT ROLE 

"The United States will continue to enforce our laws and secure our border," she said. "There are legal methods by which migration can and should occur but we, as one of our priorities, will discourage illegal migration and I believe if you come to our border you will be turned back."

The remark was in contrast to past remarks Harris had made as a presidential candidate and senator, and Republicans quickly accused her of changing tune after a migrant surge that they say was fueled by rhetoric by the new administration.

June 7, 2021: Vice President Kamala Harris talks to the press gathered under the wing of Air Force Two as she prepares to depart for Mexico, from Guatemala's Air Force Central Command. (AP Photo/Jacquelyn Martin)

June 7, 2021: Vice President Kamala Harris talks to the press gathered under the wing of Air Force Two as she prepares to depart for Mexico, from Guatemala's Air Force Central Command. (AP Photo/Jacquelyn Martin) (AP Photo/Jacquelyn Martin)

Former U.N. Ambassador Nikki Haley pointed to a 2017 tweet of Harris' when she said: "Say it loud, say it clear, everyone is welcome here."

"After years of telling migrants to come and bashing border security, Kamala Harris is now saying ‘do not come,’" Haley tweeted Tuesday. "Too little, too late: over 170,000 migrants crossed our border last month. This is a crisis and her words helped create it."

In 2019, Harris accused then-President Donald Trump of sending the military to the border as part of a "grand display based on his agenda about vilifying people and building a wall" and also accused him of "criminalizing people, innocent people." 

HARRIS, IN GUATEMALA, TELLS POTENTIAL MIGRANTS THEY WILL BE TURNED BACK: ‘DO NOT COME’ 

At an MSNBC town hall in May 2019, Harris said the U.S. has "always presented ourselves as being a nation of strength with strong arms that when people are fleeing harm, we will embrace them."

"But look at what has happened with this administration. There are children who are fleeing murder capitals of the world. Let's be clear about this. Imagine, a mother who makes a decision to pay a coyote to transport her child across the entire country of Mexico, facing unknown peril, she does that because she believes for that child to stay where they are is worse," she said at the time.

"But what does this president do? He virtually looks at those children and says, ‘go back to where you came from,’" she said.

A month later, in June 2019, she outlined her plan for a path to permanent residency for illegal immigrants in the country, and to expand protections for potential migrants due to the U.S. status as a "nation of immigrants." Critics have alleged that such promises have also incentivized migrants, who have sought to get into the U.S. so they can claim amnesty.

HARRIS TELLS GUATEMALAN PRESIDENT THAT MIGRATION IS A TOP PRIORITY, AFTER HE BLAMES US FOR SURGE

Harris pledged to "immediately get to work on passing comprehensive reform with a pathway toward citizenship, but also...a plan to take executive action to immediately reinstate protection for [Deferred Action for Childhood Arrivals] recipients and also expand those that would be allowed to actually receive DACA protection and then give Dreamers a pathway toward citizenship. Also expand protection so that we would actually defer deportation for the parents of DACA recipients, as well as siblings and spouses and [Temporary Protected Status] holders, because what we've seen under this administration really flies in the face of what we know, which is we are a nation of immigrants."

KAMALA HARRIS' MEXICO, GUATEMALA VISIT: EVERYTHING YOU NEED TO KNOW

On Tuesday, Harris' team pushed back against claims that she has sent mixed messages on illegal migration.

"The President and Vice President have been clear in dissuading people from making the dangerous and treacherous journey to the U.S./Mexico border. We encourage those who do want to come to the U.S. to do so legally and seek legal immigration options in their home countries,"  Harris senior advisor Symone Sanders said in a statement.

"The Vice President is committed to addressing the root causes of migration, which also addresses why migrants are coming to our border," she said.

But that message had been undercut by the Guatemalan president who, in an interview that aired Sunday, blamed what he saw as a more welcoming message to migrants by the new administration for the surge in migration.

CLICK HERE TO GET THE FOX NEWS APP

"The message changed too: ‘We’re going to reunite families, we’re going to reunite children,’" he told CBS News. "The very next day, the coyotes were here organizing groups of children to take them to the United States."

"We asked the United States government to send more of a clear message to prevent more people from leaving," he said.