WASHINGTON — The 113th Congress — one of the least productive on record — found itself scrambling Thursday to pass a $1 trillion spending bill amid last-minute brinkmanship and bickering that has come to mark one of the capital’s most polarized eras.

A vote on the House legislation could take place as early as Thursday afternoon. But while Republican leaders predicted passage, frustrations emerged over policy additions to the 1,600-page bill, with House Democrats objecting to a provision that rolls back an aspect of the 2010 Dodd-Frank Act, which regulates Wall Street, and another party fund-raising provision that would give big donors more influence over political parties.

Lawmakers were also preparing a safety, short-term spending measure that would fund the government only into early next year, at which point Republicans — who will then control both chambers of Congress — would be able to renegotiate the spending legislation on more favorable terms.

“We expect the bill to pass with bipartisan support today, but if it does not, we will pass a short-term C.R. to avoid a government shutdown,” Michael Steel, a spokesman for Speaker John A. Boehner, said, referring to a continuing resolution. “The length and other details of that bill have not been determined.”

Josh Earnest, President Obama’s press secretary, said that "the president supports the passage of this compromise proposal and would pass it if it comes to his desk.”

But in a closed-door meeting of the House Democratic leadership on Thursday morning, opposition hardened against the package, and Representative Nancy Pelosi of California, the Democratic leader, and her team began urging members to “keep their powder dry,” according to a person with knowledge of the discussions.

Kicking the spending bill into next year is not ideal for either party. Republicans are eager to get the package behind them so they can start 2015 with a fresh slate to make way for their governing agenda. And while Democrats find some provisions of the current spending bill objectionable, the package was negotiated on a bipartisan basis, and they are likely to be forced into even greater concessions next year.

But not everyone on the right was happy with the current deal either. Some House Republicans felt that Mr. Boehner did not go far enough in fighting Mr. Obama over his executive action last month to defer the deportation of as many as five million illegal immigrants. The spending deal would fund the Department of Homeland Security — the primary agency tasked with carrying out the president’s immigration policy — only through February, at which point Republicans will control both chambers of Congress, with the votes to try to curtail Mr. Obama’s action.

But some conservatives wanted to immediately defund the Homeland Security agency, despite the risk of a partial government shutdown.

The liberal base of the Democratic Party, led by Senator Elizabeth Warren of Massachusetts, also found itself in an unlikely alliance with the Tea Party wing of the Republican Party. Both opposed the Wall Street bailout of 2008 and fear that the spending measure would not only provide a bounty for big banks but also could help cause another economic crisis.

“Who does Congress work for?” Ms. Warren asked, speaking on the Senate floor Wednesday, as she urged House Democrats to vote against the bill. “Does it work for the millionaires, the billionaires, the giant companies with their armies of lobbyists and lawyers? Or does it work for all of us?”

For Mr. Boehner and Ms. Pelosi, the lead-up to Thursday’s vote also demonstrated both the strengths and limitations of their conferences.

The speaker displayed a willingness to buck his party’s more conservative members — as well as vocal outside groups — by passing the bill with the help of Democratic votes.

And Ms. Pelosi and her leadership team again reminded voters that House Republicans have often found themselves forced to rely on Democratic votes to pass crucial legislation, from the deal to reopen the government last year after a 16-day shutdown to relief for Hurricane Sandy.

“You cannot ask Democrats to put a bill over the top when it includes provisions that Democrats do not like,” said Representative Steve Israel of New York, a member of the Democratic leadership. “This bill is a one-two punch at middle-class voters. It weakens financial regulation on big banks and rewards Congress for doing so by increasing donation limits of big donors. This is exactly why middle-class voters have a contempt of Congress.”

Speaking Thursday on the House floor, Representative Jim McGovern, Democrat of Massachusetts, said the increase in the limit on contributions to national political parties had been “snuck into the bill with the hope that no one would notice.”

Moreover, Mr. McGovern said: “The bill would repeal, at the request of Wall Street special interests and lobbyists, important Dodd-Frank provisions. It would allow banks to engage in the same risky behavior that caused the financial crisis of 2008. What in the world are my Republican colleagues thinking?”

But Representative Tom Cole, Republican of Oklahoma, said the campaign finance change had been negotiated with Senate Democrats.

“Democrats in the Senate consented to it and, I suspect, participated in it,” Mr. Cole said.