Democrats on Wednesday muscled through a nearly $1 trillion spending bill that attempts to block President Trump's policies on climate change, abortion and immigration, underscoring Speaker Nancy Pelosi's (D-Calif.) argument that the House can work as a check on the administration.

Lawmakers passed the spending package in a 226-203 vote that fell largely along party lines. Seven Democrats voted against the measure, as did all Republicans.

The legislation includes the two largest government spending bills - one for Defense and one covering Labor, Health and Human Services and Education. It also covers funding bills for foreign operations and energy and water.

The measure takes aim at a slew of Trump's funding goals, starting with a rejection of his budget request, which proposed deep cuts to the State Department, cuts to the National Institutes of Health, the elimination of advanced energy research and a massive increase in defense spending.

"This bill rejects the administration's unacceptable budget request and irresponsible policies and, rather, strives to uphold many bipartisan congressional priorities," said House Appropriations Committee Chairwoman Rep. Nita Lowey (D-N.Y.) ahead of the floor vote.

The Democratic bill would eliminate what's known as the Mexico City policy, which blocks the U.S. from funding foreign groups that promote abortion, and it would prevent withdrawal from the 2015 Paris climate accord. Another provision would fund research into the causes of gun violence.

The measure also includes language that would block funds from being used to ban transgender people from serving in the military and prevent the sale of nuclear technology to Saudi Arabia.

The seven Democrats who voted against the measure were Reps. Denny Heck (Wash.), Ben McAdams (Utah), Alexandria Ocasio-Cortez (N.Y.), Ilhan Omar (Minn.), Collin Peterson (Minn.), Ayanna Pressley (Mass.) and Rashida Tlaib (Mich.).

Republicans slammed the spending package, saying it includes provisions that will invite a veto from Trump.

"This package has become a partisan vehicle, under-funding defense priorities, over-funding non-defense programs, carrying poison pills, and delaying action to address the crisis at our southern border," said Rep. Kay Granger (Texas), the top Republican on the Appropriations Committee.

While the legislation is unlikely to become law in its current form, it nonetheless gives Pelosi more leverage in spending talks with Senate Republicans, who have not passed any government funding bills for fiscal 2020.

Many of the provisions in the House bill are unlikely to make it through the Senate, which has lagged in producing its own spending measures. Senators say they are waiting until the House, Senate and White House agree on overall spending caps.

Pelosi hosted a meeting Wednesday afternoon to discuss raising the statutory caps, which could pave the way for the Senate to start passing its own appropriations bills. But no agreement was reached between congressional leaders and senior administration officials.

Without a deal, Congress and the White House may face a heavy fiscal lift in the fall. The deadline for raising the debt ceiling is expected to hit around that time, and missing it would lead to a U.S. debt default that would shock global financial markets.

Even if a deal is reached, the Senate will be well behind the House, which began consideration of a second, five-bill package covering $383 billion in spending on Wednesday afternoon. Democrats expect to complete passage of all 12 annual spending bills by the end of the month.

Wednesday's House-passed measure gives Pelosi an opportunity to argue that congressional Democrats are standing up to Trump at a time when dozens of caucus members are calling for initiating an impeachment inquiry against the president.

When asked about impeachment, Pelosi frequently pivots to talk about legislative accomplishments.

"I want to get back to our legislation, because that is what the American people elected us to do," she said last week when the topic of impeachment came up.

Chris Mills Rodrigo contributed.

Updated at 5:37 p.m.