Donald Trump has issued an angry flurry of tweets against Democrats, accusing the opposition party of trying to bring about a government shut down and harm America.

Infuriated by a stalemate in Congress over approving an emergency funding package to keep the lights on in government Mr Trump renounced all diplomacy.

"I promise to rebuild our military and secure our border. Democrats want to shut down the government. Politics!” Mr Trump said, in one of six tweets posted in quick succession.

Mr Trump is at the same time pushing to secure into law at least one major part of his agenda ahead of the 100 day mark of his presidency on Saturday.

Democrat politicians are threatening to oppose the short-term funding extension, if Republicans - at the behest of the White House - forge ahead with a vote to repeal Obamacare this week.

Mr Trump failed in his first attempt to see the healthcare legislation revoked, in the first humiliating defeat in his presidency.

In working to get Democrats to approve a new budget, Mr Trump has been forced to make concessions, including dropping his demand for money to build his famed border wall.

"Democrats used to support border security — now they want illegals to pour through our borders," Mr Trump wrote the third message of the series.

View of the border line between Mexico and the U.S in the community of Sasabe in Sonora state, Mexico, on January 13, 2017. Hundreds of Central American and Mexican migrants attempt to cross the US border daily.Credit:
ALFREDO ESTRELLAALFREDO ESTRELLA/AFP or licensors

Democrats have also said they may not to support the emergency funding package if it does not include spending for Obamacare subsidies that lower the cost health expenses for low-income Americans. That government funding goes to insurers who then sell Obamacare plans to customers.

Mr Trump responded by tweeting:

Democrats jeopardizing the safety of our troops to bail out their donors from insurance companies. It is time to put #AmericaFirst🇺🇸

Mr Trump said retired coal miners, part of a constituency he promised to support in his election campaign, would be among those who suffer in a government shut down because they would not receive their pensions and health packages.

“I want to help our miners while the Democrats are blocking their healthcare,” he wrote. He also accused his opponents go ruining citizens' summer holidays: “As families prepare for summer vacations in our National Parks — Democrats threaten to close them and shut down the government. Terrible!” he wrote.

At a briefing on Thursday, Sean Spicer the White House press secretary sought to justify the rant, saying that Democrats had imposed several last minute "monkey wrenches" to stop the funding package.

"They keep moving the goal posts," Mr Spicer complained, adding that the White House would not allow them to "gum up" legislation that is in the "best interests of this country".

Republican Presidential candidate Donald Trump models a hard hat in support of the miners during his rally at the Charleston Civic Center on May 5, 2016 in Charleston, West Virginia.Credit:
Mark Lyons/ 2016 Getty Images

Matt House, a spokesman for Chuck Schumer, the Democratic senate minority leader said: "These shutdown tweets are desperate, unhinged, and show a startling lack of awareness for where the negotiations actually are."

The development came as Mr Trump backed away from suggestions that he would end the North American Free Trade Agreement, a pact which he railed against as a candidate and even week declared was harmful to US workers.

Mexico, Canada and the United States form one of the world's biggest trading blocs, and trade disruptions among them could cause havoc in automotive, agricultural, energy and other sectors.

The US which went from running a small goods trade surplus with Mexico in the early 1990s to a $63-billion deficit in 2016.

Following phone calls with Justin Trudeau, the prime minister of Canada, and Enrique Peña Nieto, Mexico's president the White House said Mr Trump " the leaders agreed to proceed swiftly" to enable to a "renegotiation".

"Now, if I'm unable to make a fair deal," Mr Trump added on Thursday. "For the United States, meaning a fair deal for our workers and our companies, I will terminate Nafta. But we're going to give renegotiation a good strong show."