In a sharp turnaround from past elections, the country’s largest tech firms have emerged as some of the biggest bogeymen of the 2020 Democratic primary, with candidates vowing to crack down on or even break up companies that the party’s past White House hopefuls once pointed to as icons of American ingenuity.

From beefed-up antitrust enforcement to data privacy guarantees and new tech-focused taxes, the candidates’ proposals are aimed at holding giants like Facebook, Google, Apple and Amazon to account amid increased scrutiny of their actions and impacts on society.

But at the same time, they are also increasingly relying on the companies’ services to get their messages out, and still flock to Silicon Valley to raise money.

“It’s kind of like that Facebook relationship status: ‘It’s complicated,’” said Jessica Alter, the co-founder of Tech for Campaigns, an organization that helps Democratic candidates use technology more effectively.

The increasing vitriol aimed at the industry represents a departure from the Obama era, when the president and fellow Democrats cultivated close ties with the biggest tech firms. The cross-pollination between Pennsylvania Avenue and Sand Hill Road led some political activists to describe the valley as a “retirement community” for White House operatives headed west.

That bicoastal bonhomie has dimmed amid a cascade of scandals over data privacy, the spread of misinformation and foreign intrusion on the companies’ platforms.

“The reality is, the honeymoon is over and people are rightly demanding more regulation and transparency,” said Steve Westly, the former California state controller and a venture capital investor in Menlo Park.

Among the 2020 candidates, Sen. Elizabeth Warren has set the pace on the issue, laying out a plan last month to break up the largest tech firms. Under Warren’s proposal, the firms would be banned from operating marketplaces or exchanges while participating in those platforms. For example, Amazon couldn’t run its online store while selling Amazon-branded products on the same site, and those functions would have to be split apart into separate companies. Some other recent tech mergers, like Facebook’s acquisition of Instagram, would also have to be rolled back. The process, Warren argues, would make it harder for the corporate titans to push newer upstarts out of business.

While few of her rivals have gone that far, several are focusing on the issue. Sen. Amy Klobuchar is calling for stronger enforcement of antitrust laws — regulations to promote competition within industries — and proposing a “data tax,” with tech companies having to pay up when they profit from large amounts of user data. The funds would go to new cybersecurity efforts.

“We’ve had massive data breaches and people’s identities stolen, and (tech companies) can no longer, with credibility, say, ‘Hey, we don’t need any rules of the road,’” the Minnesota senator told reporters during a recent visit to San Francisco.

Candidates like Sen. Bernie Sanders, Indiana mayor Pete Buttigieg, former housing secretary Julián Castro and Rep. Tulsi Gabbard have also voiced support for increased use of antitrust rules. Even Sen. Cory Booker, a Stanford grad with close Silicon Valley ties who once co-founded a video startup, has tough words for big tech firms.

“They are profiting off of our private data in ways that I think violate our basic, fundamental freedoms and rights,” Booker declared at a town hall event in Washington last week, saying he wanted to get back to the days when “we used to do a lot better job of enforcing antitrust laws and broke up big companies during my childhood.”

Notably, Sen. Kamala Harris — who represents many of the tech titans — hasn’t said where she stands on breaking up the companies or using antitrust laws more aggressively, although she has had tough questions for executives in several Senate hearings.

As they campaign in the Bay Area in advance of California’s March 2020 primary, all of the candidates will likely be pressured to articulate specific positions on the topic.

Rep. Ro Khanna, D-Fremont, whose district includes the headquarters of Apple and other big tech firms, said he hoped to see candidates embrace more nuanced perspectives. In an interview, he proposed stronger regulations preventing companies from using their platforms to unfairly advantage their products while not actually splitting the firms up — Amazon could still sell Amazon-branded batteries on its own site, just not put them at the top of every search result for “batteries.”

“I think we have to have a scalpel, not a sledgehammer approach,” said Khanna, one of the national co-chairs for Sanders’ campaign. “We shouldn’t have the only big tech companies being in China, with Alibaba and Baidu and Tencent — the focus should not be breaking something up just because it’s big.”

The drumbeat of tech scandals have emboldened the candidates’ rhetoric. Trump’s victory — and the role Facebook and other social media companies played as a conduit for Russian interference in the 2016 election — marked a turning point for how Democrats viewed big tech.

“The Democratic Party saw the tech executives as magicians,” said Matt Stoller, a fellow at the liberal Open Markets Institute and a supporter of Warren’s plan, “but it turns out they were just marketers.”

Some executives have shown a willingness to accept moderate new regulations in the wake of the controversies. In a recent Washington Post op-ed, Facebook founder Mark Zuckerberg called for “a more active role for governments and regulators” in setting rules for the internet on issues like election integrity and data privacy.

Other Silicon Valley leaders are pushing back more forcefully. “It is in vogue right now to attack tech, and some of that is deserved and a whole lot of it is not,” said Carl Guardino, the president and CEO of the Silicon Valley Leadership Group, a business coalition that includes big tech companies. “If the reward for success is the destruction of a company determined through a political process and not the marketplace, what message does that send to future entrepreneurs?”

Even as they bash the tech giants, the candidates are still coming to Silicon Valley to raise money in the affluent and heavily Democratic region. Harris, Booker, Klobuchar, Castro and others have held private fundraisers in San Francisco or the valley in recent weeks. (Notably, Warren has sworn off big-dollar, closed-door fundraisers completely.)

Local observers said that the tech community hadn’t coalesced around supporting any one candidate, with Harris, Booker, former Vice President Joe Biden and former congressman Beto O’Rourke among the most common choices.

The candidates are also making wide use of the big tech firms’ services in getting their messages to voters and building their campaign infrastructure. Ads on Facebook and Google, as well as Youtube and Instagram, which are owned by the two giants, have become a key tool for campaigns to reach new voters, expand their email lists and solicit donations.

In the first three months of 2019, the Democratic presidential candidates spent $3.7 million on Facebook ads and $1.6 million on Google ads, according to an analysis by the political firm Bully Pulpit Interactive. Meanwhile, Trump’s re-election campaign and its joint fundraising committee with the Republican National Committee spent $3.8 million on Facebook and $2.4 million on Google over the same period.

In one ironic moment, Warren put up a flurry of advertisements on Facebook last month touting her plan to slice and dice the company. The tech giant took several of the ads down, citing a policy against using its logo, before reversing itself “in the interest of allowing robust debate.”

Warren quickly blasted a fundraising email to her supporters.

“If you want proof of Elizabeth’s point that Facebook has too much power,” her campaign wrote, “look no further than their ability to shut down a debate over … whether Facebook has too much power.”

No presidential race in modern history has seen this kind of focus on tech firms, observers say, and it’s only likely to be a sign of things to come.

“In every election from now to the end of my life and your life,” Westly predicted, “technology will be an increasingly big part of the debate.”