President Donald Trump signed Congress’s $1.3 trillion omnibus spending bill on Friday afternoon, despite widespread criticism of the legislation from his supporters.

The president described the 2,232-page bill as “ridiculous” but said he felt the need to sign it because of his duty to protect the country.

“As a matter of national security, I’ve signed this omnibus budget bill,” Trump said. “There are a lot of things I’m unhappy about in this bill. I say to Congress: I will never sign another bill like this again.”

Trump complained that the bill was too long with too little time to read.

“You tell me, who can read that quickly,” Trump said to reporters.

The president made his remarks in a surprise press availability at the White House just hours before he was scheduled to go to Mar-a-Lago on Friday afternoon.

Trump spoke at length about the bill, specifically pointing out the increases in military spending.

“So while we’re very disappointed in the $1.3 trillion, nobody more disappointed than me because the number is so large,” Trump said. “We had no choice but to fund our military.”

He brought Gen. Jim Mattis to the podium to praise the bill’s big investment in the U.S. armed forces.

“Today we received the largest military budget in history, reversing many years of decline and unpredictable funding,” Mattis said. “Together, we’re going to make our military stronger than ever.”

Mattis urged the military to “spend every dollar wisely” and serve as good stewards of the taxpayer’s money.

The president stunned Washington on Friday morning, after he raised problems with the bill, threatening to veto the legislation after it did not offer protections for DACA recipients and funding for his long-promised wall.

He told reporters that he “looked very seriously” at vetoing the bill, but ultimately said he signed it to fund the military.