U.S. President Donald Trump on Thursday threatened to cancel a meeting scheduled for next week with the president of Mexico if the neighboring country is not willing to pay for a border wall.

"If Mexico is unwilling to pay for the badly needed wall, then it would be better to cancel the upcoming meeting" with Enrique Peña Nieto, Trump wrote on Twitter.

The Mexican president said Wednesday night he regrets and rejects the order by the president of the United States to build a wall along the U.S.-Mexico border and reiterated once more that his country will not pay for it.

"I regret and reject the decision of the United States to continue the construction of a wall that for years, far from uniting us, divides us. Mexico does not believe in the walls, I have said it over and over, Mexico will not pay for any wall," Enrique Peña Nieto said in a televised message, regarding Trump's decision.

Peña Nieto added that he had ordered the Secretariat of Foreign Affairs to strengthen measures to protect Mexicans in the U.S., and that the 50 Mexican consulates in the U.S. would become "authentic advocates" for the rights of migrants.

"Our communities are not alone; the Mexican government will provide them with the legal advice that guarantees the protection they need. I call on legislators and civil society organizations to join in efforts to support them," he said.

Even before Trump's tweet, Pena Nieto faced growing pressure at home to scrap the meeting over objections to the border wall.

The White House did not immediately return a request for comment.

Trump signed new executive orders, including one authorizing the planned wall, on Wednesday just as a Mexican delegation led by Foreign Minister Luis Videgaray arrived at the White House for talks.

The timing caused outrage in Mexico, with prominent politicians and many on social media seeing at as a deliberate snub to the government's efforts to engage with Trump, who has for months used Mexico as a political punching bag.

Videgaray said on Wednesday night the summit was still on "for now."

On Thursday, U.S. Senate Republican leader Mitch Mcconnell said Congress plans to move ahead with the wall.

Reuters contributed to this report.