Congress passed a budget compromise bill on Thursday night that now heads to President Donald Trump — and it fell well short of his demands for border wall funding.

Congressional negotiators had only three weeks to reach a compromise deal. starting on January 25, after the recent partial government shutdown. The conference committee introduced the finalized proposal within days of their Friday deadline.

The Senate voted for the proposal on Thursday afternoon.

The House then passed the proposal, 300 to 128, a couple of hours later.

The compromise provides $22.54 billion in total border security funding, which includes just $1.375 billion for 55 new miles of physical barriers along the southern border.

Trump had wanted a lot more money — $5.7 billion — for the construction of the southern border wall to help secure the country from illegal immigration, the scourge of drugs pouring in through the border, and other issues.

The bill also funds remaining parts of the federal government through the fiscal year to September 30.

Related: McConnell Hopes Trump Will Back Imperfect Deal to Avert Another Gov’t Shutdown

Trump wasn’t happy with the proposal, yet lawmakers from both parties urged him to sign it. Senate Majority Leader Mitch McConnell (R-Ky.) said hours before it passed that the president would sign it but would also declare a state of emergency on the southern border.

The White House soon after confirmed the president was planning to do just that.

Who do you think would win the Presidency?

By completing the poll, you agree to receive emails from LifeZette, occasional offers from our partners and that you've read and agree to our privacy policy and legal statement.

Speaker of the House Nancy Pelosi (D-Calif.) and Senate Minority Leader Chuck Schumer (D-N.Y.) led the opposition to the border wall throughout the recent government shutdown.

They continued to oppose the border wall since the government reopened but have since urged the president to sign the compromise deal.

Congress formed what is known as a conference committee, which consisted of a group of lawmakers tasked with working on the deal.

The bipartisan spending package they introduced also funds remaining parts of the federal government through the fiscal year at $333 billion.

The government wasn’t fully funded when the debate over border security derailed the budget process.

“While this bill falls short of what I would have liked to see, it will provide our Customs and Border Patrol and Immigration and Customs Enforcement agents the tools necessary to continue combating the threat we face,” said Rep. Kay Granger (R-Texas), who was on the conference committee, before the vote. “It is a good down payment that will allow us to build new barriers in the areas that the Border Patrol says it is needed most.”

Trump earlier had floated the idea of declaring a state of emergency. The move could possibly allow the president to free up billions in emergency funds for the wall through the National Emergencies Act.

But the plan would also lead him into unknown legal territory — and is likely to result in lawsuits.

The budget proposal did see strong bipartisan support, though not everyone was happy with it. Rep. Scott Perry (R-Penn.) expressed concern over provisions that provide amnesty for certain illegal immigrants and reduce the budget for the U.S. Immigration and Customs Enforcement (ICE)

“This is bad policy following bad process,” Perry said from the floor before the final vote. “This bill provides amnesty for anyone in a household with an unaccomplished minor, and it protects those people who smuggled them into the United States. And it encourages them to do that even more.”

Trump said late last year that he would not sign any more spending bills that didn’t include funding for the border wall. But his plan spawned a vicious political dispute that caused a partial government shutdown. Yet the president eventually backed away from his veto threat by signing the short-term bill on January 25.

Related: Trump Unhappy with Budget Proposal Yet Doesn’t Foresee Another Shutdown

“And more than that, once they’re here, we cut $700 million from ICE and we reduced their bed space,” Perry said. “So there are fewer people looking for those here illegally and then when we find the criminals, when they committed a crime and we find them, we can’t even keep them.”

Trump and congressional leaders from both parties engaged in continued discussions on the issue. Trump has stressed the importance of having a border wall and argued it is critical to deterring illegal drugs and criminal gangs from entering this country.

Check out this video: