The House of Representatives passed a $1.16tn (£900bn) spending bill on Wednesday (3 May) ahead of an 11-day recess. The bill, which passed by 309 votes to 118, will fund the US government until September and includes money for border security and an increase in funding for the military.
The bill gives partial victories to both parties, with Republicans celebrating border security funding and Democrats applauding increases in domestic programmes. It gives the military a $15bn increase in funding and provides $1.5bn for border security, ABC News reports.
However, funding for the border wall between the US and Mexico that formed a major part of Trump's election campaign is not included in the bill.
Democrats can also claim victory as the bill does not block funding for Planned Parenthood or sanctuary cities.
Despite previously tweeting that Washington was in need of a "good shutdown" in September, the president commended the bill as a "clear win" for the American people.
His threat of a government shutdown was criticised by the second-ranking House Democrat, Steny Hoyer of Maryland, who called the threat "flippant, uninformed and irresponsible". Hoyer noted that the bill "reflects both rationality and reasonableness" and includes wins for both parties, BloombergPolitics reports.
Trump's tweets about the spending bill were clarified by Mick Mulvaney, the director of the Office of Management and Budget.
Mulvaney said the remarks were in reaction to Democrats claiming victory in the negotiation process. "I think the president is frustrated with the fact that he negotiated in good faith with the Democrats and they went out to try and spike the football and make him look bad," Mulvaney said during Tuesday's White House briefing.
The agreement, the first major bipartisan bill of President Trump's administration, is set to be passed by the Senate on Thursday and sent to the president's desk for his signature before Friday's (5 May) deadline, according to CNN. Trump will sign the spending measure in its current form if it reaches his desk, the administration said in a statement.