WASHINGTON — The U.S. House of Representatives passed a budget Wednesday that increases spending and eliminates the threat of a federal government default through 2017, though most Texas Republicans voted against the deal.  

Securing passage of one of his final pieces of legislation on a 266-to-167 vote, Speaker John Boehner calmed the congressional waters some for Wisconsin Republican Rep. Paul Ryan, his likely successor. The budget deal raises the debt ceiling, trims some entitlement programs and increases spending through 2017, likely averting fiscal drama during Ryan's honeymoon and the 2016 presidential campaign.

A coalition of 187 Democrats and 79 Republicans passed the budget. Within the Texas delegation, all 11 House Democrats voted for it, along with six Republicans. But most Texas Republicans railed against the deal.

Even without the support of 19 Texas Republicans, the budget negotiations and passage marked some of the smoothest moments in Boehner's reign. Since Republicans took over the House in 2011, budget debates have often gone down to the wire, setting off brinksmanship and tempers in Washington.

The Texas Tribune thanks its sponsors. Become one.

Fiscal fights sparked a 2013 shutdown, induced anxiety into the American economy and often resulted in Congress passing frantic, temporary short-term funding bills. Boehner was often at the center of those dramas. He generally had enough votes with the support of House Democrats and moderate Republicans to pass compromise budgets.

But about 40 hardline House GOP conservatives posed a perennial threat to Boehner, threatening to oust him if he allowed passage of budgets unacceptable to them. Appeasing that wing of the party would produce budgets unlikely to clear the Senate and earn the president's signature.   

Boehner's coming retirement eliminated the potency of the coup threat.  

"We cannot keep kicking the can down the road. That is why I voted against this budget deal," said U.S. Rep. Randy Weber, R-Friendswood, who voted against the bill. "This bill was negotiated in secret with an administration that would rather throw money at the problem than address it. Additionally, the bill was rammed down the throats of the American people and their representatives."

Weber is a member of the House Freedom Caucus, the restive band of conservatives who gave Boehner so much trouble. 

Six Texas Republicans voted for the budget: U.S. Reps. Kevin Brady of the Woodlands, John Carter of Round Rock, Mike Conaway of Midland, John Culberson of Houston, Kay Granger of Fort Worth and Mac Thornberry of Clarendon. 

The Texas Tribune thanks its sponsors. Become one.

“It’s dangerous to hold America’s military hostage to politics, as President Obama repeatedly does," Brady said in a statement after the vote. "Our nation is at war, and every opportunity I get to fully fund our military, especially for two years so they have predictability, I’ll take it." 

Brady is running to replace Ryan as chairman of the U.S. House Committee on Ways and Means. 

Earlier in the day, Ryan officially secured the support of enough House Republicans to become speaker of the House. The entire House of Representatives will vote Thursday on a speaker on the chamber floor. He is expected to easily meet the 218-vote threshold.  

The budget is expected to also pass the Senate.  

Beyond the budget and speaker election, it's been a busy week for the House ahead of Boehner's exit. On Wednesday night, the House voted to reauthorize a controversial government agency called the Export-Import Bank.