U.S. senators from Kansas hailed the passage early Friday of a $1.3 trillion spending bill that avoids the risk of another government shutdown and ends a series of short-term funding measures.

President Donald Trump agreed to sign the massive spending bill after threatening to veto over a lack of funding for a border wall with Mexico or support for young immigrants formerly protected by the Deferred Action for Childhood Arrivals program.

The Senate passed the omnibus bill shortly after midnight with support from Kansas Republicans Jerry Moran and Pat Roberts. Without it, the federal government would have shut down going into the weekend.

"I have repeatedly said passing short-term funding bills is no way to do business and ignores our responsibility as a Congress to prioritize and spend responsibly," Moran said. "Most importantly, the appropriations process gives us the opportunity to rein in agencies, departments and bureaucrats by providing them specific direction regarding how money can be spent."

Among provisions in the bill, Moran highlighted a pay raise for service members, the expansion of rural broadband, and funding for KC-46A tankers coming to Wichita's McConnell Air Force Base.

Roberts highlighted provisions that help farmers, improve background checks for gun purchases, and help fight the opioid epidemic.

"Kansans are tired of funding bills getting caught in political crossfire," Roberts said. "They want their government to function without brinkmanship. ... While I would much prefer voting on individual funding bills, this Omnibus Bill provides longer term stability for Americans to plan and to rely upon rather than the uncertainty of previous short-term funding patches and government shutdowns that we have experienced."

The bill includes $1.6 billion to begin building and replacing segments of a border wall with Mexico. Democrats failed to resolve a stalemate in a fight over the deportation of Dreamer immigrants after Trump's decision to end the DACA program.

"I am considering a VETO of the Omnibus Spending Bill," Trump tweeted Friday morning, "based on the fact that the 800,000 plus DACA recipients have been totally abandoned by the Democrats (not even mentioned in Bill) and the BORDER WALL, which is desperately needed for our National Defense, is not fully funded."

A White House official confirmed midday that he would sign the bill, which the U.S. House passed Thursday with support from all four Kansas delegates.

Republican Rep. Lynn Jenkins, who represents the 2nd District, said her support for the least bad option came with "deep reservations." The budgeting process is "profoundly broken," she said.

"It has become common for whatever party is not in power to filibuster all appropriations bills," Jenkins said, "upending the budget process and forcing Congress to lurch from one crisis to the next with the only options being a partial government shutdown, a continuing resolution that keeps all government funding on autopilot, or these massive omnibus spending bills."

Without reform, she said, "we will continue down a treacherous path toward insolvency."

The Associated Press contributed to this report.