WASHINGTON (AP) — President Donald Trump on Friday signed a bipartisan debt increase and new set of spending limits that would help lock in spending increases for the Pentagon and elsewhere in the budget.

The hard-won agreement permits the government to resume borrowing to pay its bills and sets an overall $1.37 trillion limit on agency budgets approved by Congress annually. It also ends automatic spending cuts and eliminates the prospect of an October government shutdown.

The Senate voted 67-28 on Thursday to send the legislation to Trump. The House had already passed the bill.

The legislation was a victory for both House Speaker Nancy Pelosi, D-Calif., a lead negotiator, and top Senate Republican Mitch McConnell, R-Ky., who was the key force in favor among Capitol Hill Republicans.

But conservative Republicans called the measure a bad deal that permits unchecked federal borrowing for two years and pays too much ransom to Pelosi’s demands for new funds for domestic priorities sought by Democrats.

Follow-up legislation would fill in the line-by-line details of agency budgets when the Senate returns in September. Trump is sure to continue seeking billions of dollars for border security and wall construction, but unlike last year he does not appear eager for a government shutdown over it.