Senate Minority Leader Chuck Schumer, D-N.Y., is warning that President Donald Trump should not risk a government shutdown just to get funding for a wall on the U.S.-Mexico border, The Hill reported.

"If the president pursues this path, against the wishes of both Republicans and Democrats, as well as the majority of the American people, he will be heading towards a government shutdown which nobody will like and which won't accomplish anything," Schumer said on Wednesday.

Schumer's remarks came after Trump told a rally in Arizona on Tuesday he is willing to shut down the government to secure funding for the wall, CNBC reported.

"If we have to close down our government, we're building that wall," Trump said.

The threat from Trump comes as Congress is faced with getting an overall government spending bill for Trump to sign by Sept. 30. If a bill isn't signed, the government will shut down.

And the Hill reported Democrats are opposed to including funds for the wall in the bill.