The Pentagon is seen from above Dec. 26, 2011. (AFP/Getty Images)

House Democratic leaders are facing a high-stakes test before the end of the week over whether they can persuade opposing factions of their party to unite behind the annual defense authorization bill, a traditionally bipartisan measure that Republicans, bolstered by a veto threat from President Trump, have all but pledged to oppose.

Endorsing a behemoth, record-setting defense bill goes against the orthodoxy of the party’s most progressive Democrats, who for years have railed against expanding the military’s budget without directing similar increases to domestic programs such as infrastructure, job training and scientific research. But this year, the GOP’s near-complete boycott of the measure means that Democratic leaders, newly in charge of the House, will need those liberal votes — and are engaged in concerted effort to secure them.

Earlier this week, House Armed Services Committee Chairman Rep. Adam Smith (D-Wash.) met with members of the Congressional Progressive Caucus, whose leaders warned last month they would be hard-pressed to support the $733 billion defense bill, after feeling steamrolled into voting for an emergency border bill they said didn’t do enough to protect migrants.

By the next morning, their resistance appeared to be softening.

Smith “has worked hard to include a lot of good progressive priorities” in the bill, Rep. Pramila Jayapal (D-Wash.), co-chair of the Congressional Progressive Caucus, said Wednesday. Though she noted there were additional amendments members of her group wanted to see added to the bill, “it really is the overall package; it’s not one single amendment,” she said.

By midafternoon Thursday, the House had voted to approve a handful of amendments that liberal Democrats had identified as important, including measures blocking the transfer of weapons to Saudi Arabia and the United Arab Emirates, prohibiting the United States from taking part in the Saudi-led military coalition fighting in Yemen’s civil war, and undoing Trump’s ban on transgender troops serving in the military.

But the House has yet to vote on what might be the most important tests for wavering Democratic support: a measure inserting language into the bill prohibiting the president from engaging in an unauthorized war with Iran and another to strip $16.8 billion in war funds from the defense bill.

Democrats and even some Republicans are expected to endorse the Iran measure, but the effort to reduce the overall defense authorization is expected to be blocked by Republicans and moderate Democrats, who see the effort as potentially compromising national security.

Liberal Democrats have argued they must “start challenging that narrative, that if you don’t vote for war money, you’re not a patriot,” said Rep. Jan Schakowsky (D-Ill.). While Schakowsky acknowledged that it is unlikely that the budget reduction would be approved, she said she is planning to vote for the defense bill anyway because of its benefits.

But it is unclear how many of the party’s progressives will also back the defense bill without the top-line budget change.

When Democrats have controlled Congress in the past, about two dozen Democrats have routinely declined to back the chamber’s defense bill — far more than Republicans in any given year. This year, Democrats cannot afford to lose more than 17 member votes, assuming that if more liberal members are persuaded to endorse the effort, then fewer Republicans will pledge already fledgling support.

Only two of the Republicans on the House Armed Services Committee voted earlier this year to advance the measure to the floor.

“I do not think there will be any Republican voting for the NDAA,” House Minority Leader Kevin McCarthy (R-Calif.) told reporters after the GOP’s closed-door meeting Wednesday.

Rep. Mac Thornberry (Tex.), the top Republican on the Armed Services Committee, said Wednesday that Democrats have almost entirely shut down the GOP’s ability to offer amendments to what is usually an annual bipartisan bill to fund the Pentagon. “We’ve never had a defense authorization bill this one-sided,” Thornberry said.

Several dozen Republican amendments were approved for votes by the House Rules Committee this week, including measures to annually account for U.S. allies’s defense spending levels, increase funding to Baltic states to better counter Russian aggression, and adopt secondary sanctions against North Korea, a subject also addressed in the Senate’s $750 billion version of the annual defense bill last month. Nearly 700 amendments were submitted for consideration.

Democratic leaders have argued that their measure is plenty fair to Republicans, and criticized the GOP for withholding support.

“The 733 number is a number that I believe to be acceptable to many, if not all Republicans, so the fact that they’re voting against this bill . . . is inconsistent with their claim that they support national security,” House Majority Leader Rep. Steny H. Hoyer (D-Md.) said Wednesday, referring to the House’s bill’s total $733 billion defense authorization. “We of course in the past have received substantial criticism from the Republicans when some of our members voted against defense authorization or defense appropriation bills. I think it would be hypocritical for them to do the same.”

Mike DeBonis contributed to this report.