One March evening in the nation’s capital, Senator J.D. Vance, Republican of Ohio, left a conservative gala to hitch a group having dinner with Donald Trump Jr.

Because the meal wrapped, Mr. Vance determined, on a whim, to ask a buddy, whom he had simply launched on the gala dinner, to fulfill the previous president’s son. Quickly, the three Republicans — Mr. Vance, Mr. Trump Jr. and Mr. Vance’s buddy, David Sacks, the Silicon Valley entrepreneur — had been attending to know each other for a half-hour or so in a personal eating room of the Conrad Lodge.

It was there, at that impromptu post-dinner dangle hours after Mr. Trump grew to become the presumptive Republican nominee, that Mr. Sacks signaled that he was all-in for Trump 2024.

On Thursday night, this time on his personal California turf, it was Mr. Sacks’s flip to host Staff Trump. The previous president himself flew to San Francisco to attend a fund-raiser at Mr. Sacks’s $20 million dwelling on the toniest road in town’s tony Pacific Heights neighborhood. The personal occasion, the primary marketing campaign fund-raiser since Mr. Trump’s prison conviction final week, was anticipated to boost north of $12 million, based on folks concerned in the gathering.

Past the cash, the fund-raiser in the beating coronary heart of the liberal tech trade was additionally in some methods a landmark occasion, at the very least symbolically.

4 years in the past, and definitely eight years in the past, the Bay Space remained a haven for liberalism and supplied little help for Mr. Trump. However that Obama-era bonhomie between Silicon Valley and the Democratic Get together has come near disintegrating. As of late, entrepreneurs complain as a lot about President Biden as they do about Lina Khan, the chair of the Federal Commerce Fee, who has ascended to Darth Vader-like standing in some corners of the expertise trade.

To make sure, a lot of the tech trade’s elite keep their liberal leanings on the whole lot from immigration to local weather change. Mr. Biden made his personal journey to Silicon Valley final month, the place he raised thousands and thousands of {dollars} and was feted by web icons, together with Vinod Khosla, the enterprise capitalist, and Marissa Mayer, the previous Yahoo chief government. However occasions have modified, and Republicans on a nationwide degree see a possibility to make incursions with rich entrepreneurs who’ve drifted rightward following the Covid pandemic and the resistance to the social-justice actions of 2020.

“It’s safe to say that there’s a wellspring of support in Silicon Valley,” Mr. Sacks wrote in a textual content to The New York Occasions, “especially given the backlash to the political prosecution of Trump.”

Mr. Sacks had expressed a want to associates to make the San Francisco occasion one thing of a assertion. He hoped to painting Silicon Valley as a modified place — and San Francisco as not the liberal mecca of the Grateful Useless and Allen Ginsberg.

Over the previous couple of years, Mr. Sacks, a longtime affiliate of Elon Musk and Peter Thiel, has reworked from a distinguished Silicon Valley government into an unlikely media movie star for would-be entrepreneurs, particularly these leaning proper, who take heed to his fashionable “All-In” podcast. He has additionally considerably elevated his political involvement, hiring aides to steer his giving, organising his personal tremendous PACs and, as of late, constructing relationships at Mr. Trump’s Florida dwelling base, Mar-a-Lago, hyperlinks to which he lacked simply a few months in the past.

“There’s a ton more latitude that people feel like they have now,” mentioned Saurabh Sharma, the pinnacle of a conservative advocacy group referred to as American Second, which hosted the gala that includes Mr. Sacks and Mr. Vance. “It’s not 2016 anymore.”

The journey to San Francisco was Mr. Trump’s first go to to the famously left-wing metropolis in at the very least a decade. The previous president has referred to as San Francisco “horrible,” “filthy” and “drug-infested,” and he has usually invoked its homegrown political figures, akin to Gov. Gavin Newsom and former Home Speaker Nancy Pelosi, as exemplars of what he sees as liberal excesses.

Some attendees of Mr. Sacks’s occasion flew in from out of city. The occasion at his dwelling — nicknamed the Broadcliff by him and his spouse, Jacqueline — had bought out of its two ticket ranges, $50,000 per individual and $300,000 per individual. A number of individuals who belatedly expressed curiosity in going discovered they’d be unable to take action. Later, over the weekend, Mr. Trump will probably be hosted in Orange County in Southern California by one other tech entrepreneur, Palmer Luckey, a former Fb government who went on to co-found the protection tech firm Anduril.

Individuals concerned in the San Francisco fund-raiser mentioned the roughly $12 million they anticipated to boost will beat their preliminary purpose of about $5 million. About 25 folks had been anticipated to attend the dinner, and about one other 50 or so had been slated to attend a larger reception. Mr. Trump flew to the occasion Thursday evening from Arizona, the place he took half in a city corridor in Phoenix, his first marketing campaign occasion since his prison conviction.

San Francisco police cordoned off a number of blocks surrounding Mr. Sacks’s dwelling, whereas a small group of Trump supporters rallied outdoors the barricades, waving flags and infrequently buying and selling insults with passers-by. Attendees of the dinner arrived in S.U.V.s with tinted home windows, some waving to the gathering as they drove previous.

A number of of the extra well-known Silicon Valley Republicans skipped the occasion. Mr. Thiel, who has been in Europe this week for the annual assembly of the Bilderberg Group, was not anticipated to attend, based on two folks conversant in his plans. Neither was the enterprise capitalist Marc Andreessen, a individual conversant in his plans mentioned. Keith Rabois, a distinguished G.O.P. donor and an early PayPal government alongside Mr. Sacks and Mr. Thiel, wasn’t there — however his husband, Jacob Helberg, was, alongside together with his visitor, Senator Invoice Hagerty, Republican of Tennessee.

The fund-raiser drew closely from leaders in the crypto trade. Ryan Selkis, a politically lively crypto entrepreneur, advised folks he deliberate to attend. The trade has taken a current beating from Mr. Biden, whose veto final week of a crypto-friendly invoice drove a few attendees to the Trump gathering, based on a individual concerned in the occasion.

“As opposed to an event in Palm Beach, where it’s more likely a bunch of wealthy people who want to go to France or England, this event is a little bit more about the business community saying, ‘Enough,’” mentioned Trevor Traina, a former ambassador to Austria below Mr. Trump. A buddy of Mr. Sacks, Mr. Traina deliberate to attend the occasion.

Mr. Sacks has had two major sources of assist.

The primary has been Chamath Palihapitiya, an early government at AOL and Fb, who’s now one among Mr. Sacks’s so-called “besties” on their joint podcast and a former giant donor to Democrats. The opposite is Mr. Vance, the Ohio senator who lived briefly in San Francisco and labored as a enterprise capitalist at one among Mr. Thiel’s corporations. On the fund-raiser on Thursday night, Mr. Sacks saluted Mr. Vance and mentioned that with out his assist, the occasion would have by no means occurred. Mr. Vance, who was additionally on the occasion, co-founded a donor community fashionable with some Silicon Valley entrepreneurs, referred to as the Rockbridge Community, and he was deeply concerned in urging his associates in the trade to prove for the gathering.

Mr. Vance has referred to as Mr. Sacks “one of his closest confidants” in politics. Mr. Sacks helped launch Gov. Ron DeSantis’s failed presidential bid alongside Mr. Musk on X in early 2023 and was gradual to embrace Mr. Trump. Mr. Sacks mentioned in the aftermath of Jan. 6, 2021, that the riot on the Capitol had disqualified Mr. Trump from serving in elected workplace, however Mr. Vance then spent upward of a yr making an attempt to alter Mr. Sacks’s thoughts.

Mr. Sacks has expressed to associates that he not thinks that being a Trump supporter in Silicon Valley is so provocative.

Throughout Mr. Trump’s final journey to Silicon Valley for fund-raising in the autumn of 2019, organizers labored exhausting to disguise the host of the occasion, out of concern of a backlash, not informing company of the exact location till very near the day of the fund-raiser. These days, Trump supporters in tech take satisfaction — a signal in itself. Ron Conway, a chief of liberal tech executives for many years, has grown alarmed by the pattern and inspired a few associates to skip the occasion, based on a individual conversant in his considering. Different Democratic veterans in tech have even questioned the hosts privately and successfully requested them if they’d misplaced their minds.

Shawn Metal, a Republican Nationwide Committeeman from California who has labored in politics for many years, referred to as the pro-Trump cohort of Republican givers “true, new gladiators.”

“I gave up on Silicon Valley years ago,” Mr. Metal mentioned. “There’s been a transformation — real money is coming.”

Mr. Sacks had expressed an curiosity in turning the occasion into a content-creation alternative, maybe by pulling out microphones for a dwell taping of Mr. Sacks’s and Mr. Palihapitiya’s podcast. That plan was scuttled. Nonetheless, the paper invitation to donors was positive to connect a relatively particular honorific atop the names of those two skilled enterprise capitalists: “All-In Co-Hosts.”

Kate Conger contributed reporting.