When Senator Elizabeth Warren declared that she was running for president in February, she described Donald Trump’s administration as “the most corrupt in living memory.” But she didn’t stop there: “Even after Trump is gone, it won’t be enough to do a better job of running a broken system,” she said.

Warren’s speech was centered around the notion that political corruption is not a uniquely Republican problem. “To protect their economic advantages, the rich and powerful have rigged our political system as well,” she continued. “They’ve bought off or bullied politicians in both parties to make sure Washington is always on their side.”

Anyone who’s followed Warren’s career knows she’s been making statements like this for years. But her position is suddenly mainstream: Almost every major contender for the Democratic presidential nomination is rejecting corporate PAC money and decrying the influence of the financial sector, albeit with varying degrees of sincerity. These are all implicit criticisms of the Democratic Party. Barack Obama, for example, collected more money from Wall Street in 2008 than any candidate in history, failed to prosecute any bankers for the financial crisis, and appointed officials with Wall Street ties to key financial regulatory positions in its wake.

Warren was Obama’s biggest critic on the left. She opposed major pieces of legislation that benefited Wall Street or pharmaceutical interests; tore into some of Obama’s cabinet members in public hearings; and even blocked an Obama nominee to a high-ranking Treasury position. The question now is whether these battles against a man whom 95 percent of Democrats view favorably will harm Warren, or whether the party’s leftward turn on economic issues in particular will ultimately carry her to the White House.

Elizabeth Warren was teaching at Harvard Law School when, in 2008, then–Senate majority leader Harry Reid selected her for the Congressional Oversight Panel for the Troubled Asset Relief Program (TARP), which had written America’s biggest banks a $700 billion check with precious few strings attached. Warren, a bankruptcy expert, was then elected as the panel’s chair. “The role of congressional oversight is to ask the tough questions, to push back on the decisions, to request additional information, and to recheck the numbers,” Warren said in an interview at the time. “It’s our job to be cranky.”

And cranky she was. She pushed Treasury officials under both Bush and Obama for more transparency over where the TARP money was going and asked loudly why homeowners weren’t receiving enough of it. Warren did more than simply oversee what TARP authorized; she raised larger questions about how the economy was structured and whom it was designed to benefit.

One of the reports she presided over argued for government reorganization of the banks or even full-on nationalization. It highlighted international examples of past financial crises and said that ousting management and selling bank assets was the way to go.

Not surprisingly, Warren’s agitating didn’t endear her to many Democrats in Congress. Nor did it please Obama’s Treasury Department. “Some Democrats complain that Warren’s role as a constant Cassandra could undermine already tenuous public support for the bank, auto industry and other financial rescue programs,” Politico reported, paraphrasing anonymous officials. Neil Barofsky, TARP’s inspector general, later wrote in his book Bailout that an Obama Treasury official tried to create a split between him and Warren by falsely telling him “how much Elizabeth Warren hated me, was jealous of me, and was plotting my demise.”

Warren acknowledged in her own book, A Fighting Chance, that she wasn’t exactly popular inside the Beltway. “I started hearing that many Washington insiders were surprised (and some were aggravated) that we were going just as hard on the Democratic administration as we had on the Republicans,” she wrote, “but I wasn’t going to stop and worry about that.”

What’s more, her haters hadn’t seen the half of it. The pivotal moment of Warren’s tenure on the Congressional Oversight Panel came in June 2010, when then–Treasury Secretary Timothy Geithner testified at a hearing. At the time, the Obama administration was preparing to get the Consumer Financial Protection Bureau off the ground. It was a bureau that Warren had designed to police financial-services companies offering consumer products (no single government agency was doing that at the time), and progressive activists were pressuring Obama to put Warren in charge.

Before the hearing, “I had thought [Warren] might go lightly on [Geithner] with the [CFPB] job still up in the air,” Barofsky wrote. “After all, she was making no secret of her desire for the job, and the White House had to be watching her every move.”

Warren did not go lightly on Geithner. In response to a question about the Home Affordable Modification Program, Geithner was dismissive of criticism “from people who had hoped that the program would be designed to keep a much larger fraction of Americans in their homes.” Warren laid into him, pointing out that HAMP didn’t make payments to homeowners directly, but instead sent the money to mortgage servicers, who make profits from interest payments and have no incentive to bail people out. They wouldn’t even lose money on most foreclosures.

“I had not intended to ask you about this, but I want to go back,” Warren told Geithner. “The early modification programs actually got people into more trouble, raised their overall payments, had them owing more principal than they had started out with…. You set aside $50 billion, and what do you have to show for it?”

The exchange went viral on YouTube, and Warren was ultimately vindicated: Servicers simply delayed seizing clients’ homes and collected some extra payments and late fees before foreclosing on them anyway. In fact, according to the TARP inspector general, a full 70 percent of borrowers who applied for the program were ultimately denied a permanent modification. At the time of the hearing, as Warren pointed out, only 347,000 homeowners out of a projected 3 to 4 million had received a permanent modification to help avoid foreclosure. Overall, only about a million ended up getting help.

“I thought it was a remarkably principled act,” Barofsky later wrote, “the exact opposite of what any other person in Washington angling for a high-profile job would have done.”

Though this public altercation raised Warren’s profile, she wasn’t banished from the CFPB. Still, the nascent bureau would have no real enforcement power until Obama and the Senate agreed on a permanent director. Progressives rallied in her favor—they even made a music video rapping, “Sheriff Warren, she’s what we need, yo”—and White House advisers Valerie Jarrett and David Axelrod were reportedly backing her too. But Geithner and his allies were dead set against giving her the job. Facing heavy opposition from congressional Republicans as well, Obama ultimately chose not to nominate her.

Warren wrote in her book that she was “disappointed, but not surprised…. It was pretty clear from the beginning that [Obama] wasn’t itching to give me the post.” But there seems to be no animosity in their relationship. Warren spoke warmly of the president and posted a smiling selfie with him on his last day in office; Obama even encouraged Warren to run for her Senate seat in 2012.

This is all despite the fact that Warren kept coming at Obama from his left and rode a wave of progressive anger over the disproportionate wealth and power of Wall Street after the collapse. An early flare-up on this front involved the year-end omnibus spending bill in 2014. One provision of the Dodd-Frank financial-reform legislation withheld government insurance for banks that traded derivative swaps, complicated financial products that often disguise and disperse serious liabilities. The goal was to discourage the risky behavior that had so recently led to calamity, but the GOP-controlled House had repealed that provision. Few Senate Democrats approved of the repeal, but said they’d still vote for the Republican spending bill to avoid a government shutdown. The Obama White House signaled that it, too, would support the bill, repeal and all.

Warren was left leading a lonely charge to kill it. She didn’t spare her Democratic colleagues. “Who does Congress work for?” she asked in a speech on the Senate floor. “Does it work for the millionaires, the billionaires, the giant companies with their armies of lobbyists and lawyers?” A bill passed the Senate three days later. But Warren wasn’t done.

Earlier that year, Obama had nominated Antonio Weiss—a veteran investment banker and Obama bundler who enjoyed broad support from most of the party—to serve as under secretary for domestic finance at the Treasury. But Warren wasn’t a fan: She saw Weiss as a poor fit for a high-ranking regulatory job, not least because he’d recently helped Burger King complete a complicated tax-inversion deal to lessen its US tax burden. After losing the spending-bill fight, Warren took to the Senate floor to denounce his nomination. “Enough is enough with Wall Street insiders getting key position after key position and the kind of cronyism that we have seen in the executive branch,” she declared.

The scene, captured in another video, also went viral—apparently, taking on Obama over Wall Street struck a nerve—and Warren became the icon for a successful activist push to stop Weiss’s nomination. The pressure kept the Senate from acting before the end of the 115th Congress, and Weiss wrote to Obama and asked not to be renominated.

Wall Street financier Steven Rattner, a former colleague of Weiss’s, lamented to The Washington Post that “poor Antonio” had “become a pawn in the struggle for the heart of the Democratic Party.” Meanwhile, a Warren source told the paper that it was indeed a struggle—one that Warren was winning. “I think there’s a finite amount they’re willing to bleed,” the adviser said. “Every time we attack them, they bleed.”

For Warren, no fight was bloodier than the battle over the Trans-Pacific Partnership trade deal, which began when Congress passed fast-track trade authority in 2015. Warren was an early opponent of the bill, and she focused her criticism on provisions that opened a back door for international conglomerates to repeal important US regulations, including many enacted under Dodd-Frank. Obama’s advisers, meanwhile, were pushing the TPP as a legacy-building achievement.

That’s when Warren’s advocacy provoked a direct rebuke from the president. In an interview with Yahoo News, an “unusually irritated” Obama said that “the truth of the matter is that Elizabeth is, you know, a politician like everybody else…and you know, she’s got a voice that she wants to get out there. And I understand that.”

In trying to drop a bomb on Warren’s persona as an incorruptible crusader for the little guy, the president of the United States leveled probably the most damaging insult he could: She’s just a politician.

Fast-track trade authority narrowly got through Congress, but Warren still won the war: Hillary Clinton would oppose the doomed TPP in the Democratic primary. And a quick scan of the 2020 candidates—not to mention Warren’s prominent place among them—shows how quickly party leaders have adopted her position.

Warren kept up her fight through the final days of the Obama administration. In December 2016, only weeks before he left office, Obama, his staff, and many cabinet officials gathered in the Rose Garden to celebrate the passage of the 21st Century Cures Act, which aimed to accelerate medical research. The gathering was a chance for Obama to mark one last major accomplishment before leaving office—but Warren didn’t think it deserved the time of day. She’d already shredded the bill on the Senate floor days prior for its “huge giveaways” to the pharmaceutical industry, explaining that “when American voters say Congress is owned by big companies, this bill is exactly what they are talking about.”

As Warren now campaigns for the nomination on her increasingly popular yet decades-old positions, her opponents on Wall Street—and their friends in the Democratic Party—aren’t changing their tune either.

Steven Rattner said recently on MSNBC that Warren was too “anti-capitalist” and “anti-rich” to beat Trump (never mind that Warren, who is not a socialist by any stretch, has critics to her left who complain that she isn’t anti-capitalist enough). After Warren took a DNA test last October to “prove” her Native American heritage, Jim Messina, Obama’s former campaign manager, rushed onto MSNBC to call her “cynical” and bad for the Democrats. (After leaving the Obama orbit, Messina went on to work for the UK’s Conservative Party.)

Warren’s fellow presidential contenders may also use her departures from party orthodoxy against her, just as Clinton used Sanders’s critiques of Obama to score points during a 2016 debate in Milwaukee, saying: “The kind of criticism that we’ve heard from Senator Sanders about our president, I expect from Republicans.” (Sanders called Clinton’s remark a “low blow” and said, “Last I heard, a United States senator had the right to disagree with the president.”)

What Elizabeth Warren has going for her is the fact that Democratic voters have never particularly liked Wall Street bailouts or big international “free-trade” deals. She, for one, won’t have to renounce her record to appeal to their beliefs. Her presidential campaign is a bet that someone who has been a strong critic of the political system and the Democratic Party can become the leader of both by being consistent, credible, and right. This is the bet that Obama made in 2008, when his strong opposition to the Iraq War was shared by a majority of voters but far from a majority of elected Democrats. It worked for him, and it may just work for her.