President Donald Trump on Friday denied reports that he asked, in a meeting with lawmakers about protections for immigrants from Haiti, El Salvador and African countries, "Why are we having all these people from s---hole countries come here?"

"The language used by me at the DACA meeting was tough, but this was not the language used," Trump said.

@realDonaldTrump: The language used by me at the DACA meeting was tough, but this was not the language used. What was really tough was the outlandish proposal made - a big setback for DACA!

The president declared that he "never said anything derogatory about Haitians" beyond that "Haiti is, obviously, a very poor and troubled country."

"I have a wonderful relationship with Haitians," Trump said.

@realDonaldTrump: Never said anything derogatory about Haitians other than Haiti is, obviously, a very poor and troubled country. Never said "take them out." Made up by Dems. I have a wonderful relationship with Haitians. Probably should record future meetings - unfortunately, no trust!

Trump attacked the proposed deal for the Deferred Action for Childhood Arrivals (DACA) program in further tweets, after the White House denied that an agreement had been reached to extend the program. The president said the "so-called bipartisan" deal "was a big step backwards."

"Wall was not properly funded, Chain & Lottery were made worse and USA would be forced to take large numbers of people from high crime...countries which are doing badly," Trump said in two tweets.

@realDonaldTrump: The so-called bipartisan DACA deal presented yesterday to myself and a group of Republican Senators and Congressmen was a big step backwards. Wall was not properly funded, Chain & Lottery were made worse and USA would be forced to take large numbers of people from high crime.....

@realDonaldTrump: ....countries which are doing badly. I want a merit based system of immigration and people who will help take our country to the next level. I want safety and security for our people. I want to stop the massive inflow of drugs. I want to fund our military, not do a Dem defund....

Six bipartisan senators announced Thursday that they reached a deal in principle on legislation that would shield hundreds of thousands of young immigrants from deportation. It remains to be seen, however, if the chamber's leaders, the House of Representatives, or the White House would get behind their framework.

Trump, at a Tuesday meeting with lawmakers, had signaled that he would sign any legislative solution that Congress passes to shield the undocumented immigrants.

Democrats, and many Republicans, do not want to authorize federal funds to build Trump's proposed physical barrier on the U.S.-Mexico border. Trump ended the Obama-era DACA program in September with a six-month delay. Under the administration's plan, DACA would cease March 5 unless Congress can pass the protections into law. Those immigrants brought to the U.S. illegally as children will no longer be shielded from deportation or have the ability to work legally in the country.

Trump also accused Democrats of "shutting down" the U.S. military, saying the party's members are not "interested in life and safety."

@realDonaldTrump: ....Because of the Democrats not being interested in life and safety, DACA has now taken a big step backwards. The Dems will threaten "shutdown," but what they are really doing is shutting down our military, at a time we need it most. Get smart, MAKE AMERICA GREAT AGAIN!

— CNBC's Jacob Pramuk contributed to this report.