WASHINGTON — President Trump signed a $1.3-trillion spending bill Friday, and as he castigated it as “ridiculous,” signaled a central reality of national politics: Republicans who control Washington are being led by a man who wants little to do with them.

He still prefers a party of one.

Hours after threatening a veto that would have shut down the federal government, Trump grudgingly signed the bill in a speech suffused with scorn, although the White House — and Trump, according to his aides — had endorsed the measure less than two days earlier. He savaged Republican leaders on Capitol Hill, as well as Democrats, for the contents of a bill they had contorted themselves, at political risk, to pass.

Trump came to office as an outsider. More than 14 months after assuming the presidency, by all signs he wants to remain one, a difficult task for the head of a government, much less someone being counted on to lead his party in the November election.

On Friday, he appeared physically uncomfortable as he described all the items he did not want in the deal he had just signed. He demanded a line-item veto for budgetary matters, long a desire of presidents but one that would require a constitutional amendment.

In his choice of words, Trump went out of his way to create distance between himself and everyone else. A side effect of his protestations: The man who had crowned himself as a master deal-maker made himself seem less than essential in Washington’s latest massive deal.

“It’s always been a problem for our country,” Trump complained, pointing blame at unspecified opponents. “They get together and they create a series of documents that nobody has been able to read because it was just done. Now, you tell me who can read that quickly. It takes a long time to read it.”

Just as he was during the campaign, Trump appears to be a man fighting to stay apart.

“We’re seeing him struggle with what most any outsider struggles with: Once you are elected, how long can you get away with being an outsider? How long can you get away with not being in charge?” said Republican strategist Rob Stutzman.

“You can position yourself as an outsider for a year, then you have to transition. Trump clearly is having trouble at the moment reconciling all that.”

The measure came to Trump as the deadline bore down for financing the government. The House passed it Thursday morning; the Senate’s assent, on a bipartisan vote as in the House, came early Friday, hours before the midnight shutdown deadline.

Ideally, Friday could have been a day for both sides to tout significant wins in what may be the last big piece of legislation to pass in this midterm election year.

But Republicans suffered for Trump’s criticism, which served as a reminder of the party schisms that his presidency has fostered.

In the last several days alone, as Republicans presided over the mammoth spending bill, Trump announced billions of dollars in trade tariffs. Such expansive spending and tariffs have both long been opposed by a party that prides itself on fiscal diligence and free trade, and the alternatives as more in the traditional wheelhouse of Democrats.

What exactly defines a Republican has fractured as some of them cast off long-held views in order to position themselves closer to Trump, the chief motivator of the party’s voters. It has also added to the uncertainty for wobbling voters about where exactly Republicans stand.

The public way in which Trump tried to navigate from responsibility for the budget plan added to the potential threat to him and the party’s image.

He teased opponents of the spending bill with the veto threat Friday morning, only to back off and support it, potentially angering both sides. In besmirching Republican leaders, he did them no favors as they seek to craft a message for their candidates in November that will give them some cover from voters’ strongly anti-Washington mood.

Some of his usual allies broke ranks.

Fox News personality Pete Hegseth, a favorite of the president, called the budget Trump signed a “swamp budget,” referring to the Washington denizens Trump vowed to toss from the capital, and has not. Shortly thereafter, Trump tweeted his veto threat.

Then when he signed the bill after all, the Drudge Report headlined Trump’s “Fake Veto.”

Steve Deace, an influential conservative radio host, mocked the signing with a tweet: “Make America Great Again, or something.” Ann Coulter, the firebrand conservative, quoted Trump’s statement that he “will never sign another bill like this again,” and added, “Yeah, because you’ll be impeached.”

From the more moderate side of the party, Ohio Gov. John Kasich sent out fundraising letters excoriating the budget deal because of the amount it would spend. “Enough is enough!” he said.

On Capitol Hill, there was some sense of relief that weeks of negotiations had not been dashed by a capricious president. In the hours between Trump’s veto threat and his signing of the bill, members of Congress left for vacations and overseas delegations for their planned two-week break.

Most members of Congress kept publicly mum about the president’s threat, as they crossed fingers that the storm would pass. “People mostly think he’s venting frustration about the process,” said one hopeful aide.

Trump’s public reaction to the bill exposed one glaring problem for him as he seeks to direct the government: He seems fixed in his last role — that of the leader of a company whose word was unquestioned. In a narrowly divided nation represented by a narrowly divided Senate, compromise of some sort is inevitable, but not something Trump embraces.

He repeatedly praised the military spending included in the bill, crediting it for turning him away from a veto that would have shut down the government. That spending was the chief Republican argument for the measure, and made one of Trump’s favorite aides, Defense Secretary James N. Mattis, an advocate for it.

But Trump rebuked Republicans — and condemned Democrats — for the trade-offs that helped make all of that military spending possible. Democratic votes were necessary because many Republicans refused to sign off on the domestic spending included in the plan. Moreover, Republicans themselves acknowledged that many of the domestic programs are popular.

There was some irony. Among those who publicly praised the domestic spending included in the measure was his own daughter and aide, Ivanka Trump, who touted increased spending for child-care programs.

To Republican leaders who had already weathered complaints from many of their members, his criticisms were no less galling for their familiarity. Even Trump’s own team had fiercely defended those trade-offs the day before the president criticized the bill.

“Is it perfect? No. Is it exactly what we asked for in the budget? No,” said Trump’s budget director Mick Mulvaney, a former congressman. “Were we ever going to get that? No, that’s not how the process works.”

As he set himself off from Washington’s tribes, Trump demonstrated little in the way of bending to that reality, which has limited his influence on Republican lawmakers, angered Democrats who once hoped to cut deals with him, and confounded even his own exhausted staff.

Asked whether Friday had been a baffling day, one aide replied: “It’s been a baffling year.”

cathleen.decker @latimes.com

noah.bierman @latimes.com