Sen. John McCain, R-Ariz., condemned Congress for not reaching a long-term and bipartisan budget agreement, claiming a an impending government shutdown or passage of a stopgap measure hurts military service members.

“As we approach tomorrow’s funding deadline, the only two options on the table seem to be a government shutdown and yet another continuing resolution. Those who will pay the price for either failure are America’s service members,” McCain said in a statement after the House passed a temporary spending bill and before the Senate is expected to vote on it Thursday evening.

“Nearly one-third of the way through the current fiscal year, it is unconscionable that Congress still has not negotiated a bipartisan budget agreement,” said McCain, who is chairman of the Armed Services Committee. “For months, it has been clear we would need a long-term agreement to lift the spending caps of the Budget Control Act and provide the military the funding it needs to properly train, equip and prepare our forces. Congress’ inability to reach a budget agreement is a total abdication of our responsibility to defend the nation and give our service members the resources they need to succeed.”

House Republicans gained enough support for the legislation after GOP leaders promised to call up a conservative immigration reform bill and a bill that would provide a year’s worth of funding for the Defense Department.

In addition to reauthorizing the Children’s Health Insurance Program for six years, the bill delays or suspends multiple Obamacare taxes.

Democrats have pushed back on the spending bill, because they want to see funding for combating the opioid epidemic and are also trying to secure a deal to protect those covered by the Deferred Action for Childhood Arrivals program, which prevents those who came to the U.S. illegal as children from being deported.

McCain said that while he does believe in helping those who are covered by DACA, he views “holding our men and women in uniform hostage to other demands [as] a dereliction of our first duty as members of Congress provide for the common defense.”

McCain said that Congress must provide “sufficient, stable funding” for the military, which he said is not possible without long-term budgeting or through additional continuing resolutions.

The House bill was passed on Thursday by a 230-187 margin, with six Democrats voting for it and 11 Republicans against it.

When the Senate considers its version of the bill, McCain, who is still recuperating after a hospitalization as a result of cancer treatments, will not be there to cast a vote.