This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

WASHINGTON (NEXSTAR) — The House of Representatives may have averted an impending government shutdown by passing a spending deal addressing funding for border security, gun violence and the military.

The deal, passed by the House on Tuesday, may have ended a weeks-long fight to fund the government over money for President Trump’s border wall: Republicans wanted to increase funding while Democrats wanted to kill it altogether.

“This bill does not give President Trump additional border security funding over what he had last year but it does give him what he had last year. It’s a compromise,” said House Democratic Leader Steny Hoyer.

Democrats also included millions of dollars in the package to pay for official oversight of immigration detention facilities.

The nearly $1.4 trillion spending package also provides $425 million for states to beef up election security and includes $25 million Democrats say will help get a grip on gun violence.

“By funding gun violence research at the CDC and the National Institutes of Health for the first time in more than 20 years,” said House Speaker Nancy Pelosi.

The spending package was split into two bills. Rep. Kay Granger (R-TX) said Republicans also won their share because the deal increases defense spending, extends some business tax breaks and “secures the largest pro-life victory in a generation by maintaining the Trump administration’s Title X family planning regulation.”

The deal also raises the legal age for tobacco to 21 and extends tax cuts for middle-class families.

The spending package will have to be approved by the Senate and signed by Trump by Friday to avoid a shutdown.