WASHINGTON — Congress took a major step on Thursday to keep the federal government's doors open through the end of September, passing a massive spending bill that includes some funding for a border wall.

The $1.3 trillion measure, which lawmakers scrambled to pass ahead of a government shutdown deadline Friday night, was on its way to President Donald Trump after the U.S. Senate passed it late Thursday on a vote of 65-32. The new spending restores funding on many of the austerity measures Republicans implemented since taking over the U.S. House in 2011.

As such, it is expected to further increase the ever-ballooning federal deficit. 

The bill will boost spending on various projects, including infrastructure and a border wall. The $1.6 billion allocated for a wall fell far short of the Trump administration's demands, and Democrats were able to exact significant restrictions on the wall's construction, including avoiding building it in a wildlife preserve and blocking any construction of the barrier as a solid concrete wall.

The Texas Tribune thanks its sponsors. Become one.

Texas' two senators split their votes. Sen. John Cornyn voted for the measure while Sen. Ted Cruz opposed the bill.

Earlier Thursday, the House passed the bill on a vote of 256-167. Most Texas Republicans fell in line with their leadership on the bill, but a handful from the conservative wing of the party voted against it: U.S. Reps. Brian Babin of Woodville, Joe Barton of Ennis, Blake Farenthold of Corpus Christi, Louie Gohmert of Tyler, Ted Poe of Humble and John Ratcliffe of Heath. 

Five Texas Democrats backed the bill: U.S. Reps. Henry Cuellar of Laredo, Al Green of Houston, Gene Green of Houston, Eddie Bernice Johnson of Dallas and Beto O'Rourke of El Paso. Six other Democrats voted against the legislation: U.S. Reps. Joaquin Castro of San Antonio, Lloyd Doggett of Austin, Vicente Gonzalez of McAllen, Sheila Jackson Lee of Houston, Marc Veasey of Fort Worth and Filemon Vela of Brownsville.

There are no provisions in the legislation to address extending the Deferred Action for Childhood Arrivals, or DACA, program, which was a major issue for many Texas Democrats. The Obama-era program, which Trump has made efforts to end, affects about 124,000 Texans, allowing them to remain in the country and work without the immediate threat of deportation.

Additionally, Cruz expressed frustration earlier in the week to The Texas Tribune that legislation he supported that would overhaul Congress' sexual harassment policies was not included in the bill. 

Cruz, however, issued a lengthy statement opposing the plan on various fronts, including funding a governmnet agency called the Export-Import Bank, insufficient border funding and funding for Planned Parenthood.

The Texas Tribune thanks its sponsors. Become one.

“To be sure, this bill could have been even worse. I am happy to say that I was able to fight to keep out even more egregious proposals.

But two Texans in particular were big winners with the legislation: Cornyn and U.S. Rep. Mac Thornberry of Clarendon. 

“After the tragedy in Sutherland Springs, I vowed to that community to do what I could so no family, school, or congregation would have to go through that again,” Cornyn said. “While it’s not the only solution, I’m confident this bill will save lives.”

Cornyn spent the last several months pushing policy that would enhance the federal background check system for purchasing firearms. He successfully attached the measure onto the spending bill earlier this week. 

Thornberry, the U.S. House Armed Services Committee chairman, is one of the fiercest advocates for increased military spending. The bill approved Thursday includes a 10 percent increase in Pentagon funding from the last fiscal year. 

"The bill we're about to vote on turns the corner in fixing our planes and ships and readiness," Thornberry said ahead of the vote Thursday. "And it also sends a very strong message to allies and adversaries alike that the United States is going to stand up and defend ourselves."

While the midterms are still seven months out, this bill is considered one of the last significant bills Congress will address before the coming elections. 

Read related Tribune coverage: