A Senate plan to boost next year's military pay raise and increase the end strength of each of the armed services failed Thursday over ongoing funding fights between lawmakers.

The defeat sets up a spending showdown later this summer with House lawmakers, who have already agreed to used about $18 billion in increased defense funding to pay for those priorities and a host of new equipment purchases.

The Senate's $602 billion authorization bill includes a 1.6 percent pay raise for troops next year, a massive overhaul of the military medical system and defense acquisition process, and billions for new equipment purchases and reset.

Republicans in both chambers have argued that total is still billions short of what is needed to ensure force readiness, and have pushed for ways to get around defense spending caps set by Congress last fall.

Democrats in the Senate insisted that a proposal by Sen. John McCain, R-Ariz., to add $18 billion to the fiscal 2017 defense funding plan also be offset by an equal amount of nonmilitary spending, including money for cybersecurity efforts, U.S. border security, drug abuse assistance programs and Zika virus-prevention efforts.

"We need to begin working together now to remove the budget caps and the threat of sequestration, not just for the Department of Defense, but for all federal agencies that contribute to our collective national and economic security," said Senate Armed Services Committee Ranking Member Jack Reed, D-R.I., before the vote.

× Fear of missing out? Sign up for the Early Bird Brief - a daily roundup of military and defense news stories from around the globe. Thanks for signing up. By giving us your email, you are opting in to the Early Bird Brief.

But McCain, chairman of the committee, said the funding shortfall for the military poses a national security threat, and needs to be addressed before other less-pressing domestic issues.

His amendment would have spent the $18 billion on a 2.1 percent pay raise for troops and a boost in Army end strength next year by 15,000 soldiers. The other services also would have seen smaller personnel adds, and billions more in new ships and aircraft.

"For five years we've let politics, not strategy, determine what resources we give our military service members," he said before Thursday's tally. "Our military commanders have warned us that we risk sending young Americans into conflicts for which they are not prepared."

I urge my colleagues to do the right thing & fully fund our troops - their security & success depends on it #FY17NDAA — John McCain (@SenJohnMcCain) June 9, 2016

Opposing the extra money, he said, "means a vote in favor of another year where the pay for our troops doesn't keep pace with inflation or private-sector averages. … You'd be voting in favor of cutting more soldiers and Marines at a time when the operational requirements of our nation's land forces are growing."

Both McCain's proposal and the Democratic counter-proposal failed. The domestic spending plan was defeated by a 43-55 vote. McCain's plan picked up 56 supporters, but needed 60 to advance under Senate rules.

Sen. Lindsey Graham, R-S.C., lambasted his colleagues who blocked the defense funding increase — which included 11 Republicans — calling it a case of politics trumping common sense.

"Everybody loves the military," he said. "Well, your love doesn't help them. Your love doesn't buy a damn thing. If you love these men and women, you will adequately fund their needs."

House members added the extra money in their version of the annual authorization bill last month, over objections from Democrats. But they bypass the defense spending cap by shifting $18 billion from overseas contingency funds to the base defense budget, leaving operations in Afghanistan and the Middle East funding only into spring 2017.

Pentagon officials have called that approach dangerous, and the White House has threatened to veto the measure if that funding "gimmick" is used. McCain and other Senate Republican leaders have said they do not support the war funding shift either.

The Senate is expected to complete work on the authorization bill in coming days. House and Senate negotiators will spend the rest of the summer trying to find a compromise between the funding mechanisms and totals before sending the final bill to the president.

Leo Shane III covers Congress, Veterans Affairs and the White House for Military Times. He can be reached at lshane@militarytimes.com.