In the fall of 1998, it seemed like President Clinton was in trouble. An investigation by independent counsel Kenneth Starr had uncovered an affair between the president and White House intern Monica Lewinsky. And after months of denials, Clinton finally admitted to having had “an inappropriate relationship” with Lewinsky, which was then recounted in graphic detail in the report Starr sent to Congress. The affair and the president’s attempts to hide it were quickly denounced by Republicans and Democrats alike. In a speech on the Senate floor, then-Democratic Sen. Joe Lieberman said Clinton’s conduct was “disgraceful” and “immoral.” Just a few weeks later, the House voted to open an impeachment inquiry, with the support of 31 Democrats.

Months later, though, Clinton hadn’t just survived the impeachment process — he had managed to weather it with high approval ratings and the backing of his party. Despite bipartisan rumblings of displeasure with the president as the inquiry took off, public support never really coalesced behind impeachment, and the effort was ultimately perceived by many as a partisan attack by House Republicans bent on taking down a political opponent.

So as the Democrats plunge forward with their impeachment inquiry, Clinton’s failed impeachment looms as a cautionary tale. After all, no Republicans at this point have come out in support of an impeachment inquiry, which means Democrats will arguably have even more work to do to convince the public that the allegations against President Trump aren’t merely political. And although support for impeachment is on the upswing, it’s hard to predict if that will last — or if public opinion will just ossify along familiar partisan lines, as it did during Clinton’s impeachment.

It’s tempting to think of Trump’s impeachment as a sequel of sorts, but there are already signs that what’s happening today could unfold quite differently. For one thing, the case against Clinton hinged on the findings in Starr’s report. By contrast, today’s Democrats didn’t choose to orient their inquiry around findings in special counsel Robert Mueller’s report that examined misconduct by Trump: They are instead building a case against the president in real time, which makes it harder to predict where the public will ultimately land.

And although there’s still a significant risk that the investigation will be perceived as partisan, the nature of the allegations against Trump are quite different. Many Americans saw Clinton’s affair with Lewinsky as a “private matter,” but Trump pressuring Ukraine to investigate the son of Democratic presidential candidate Joe Biden is much more clearly tied to his role as commander-in-chief. So it’s entirely possible that the public will be less forgiving this time.

Clinton was popular. Impeachment wasn’t.

By the time the House of Representatives voted to open an impeachment inquiry against Clinton in October 1998, the allegations against the president had been in the news for months. Clinton had publicly confessed to the affair in August, and in mid-September, Starr delivered his lengthy and salacious report — which included a case for impeaching Clinton — to Congress.

At that moment, support for impeachment seemed like it might be on the upswing. A Gallup poll conducted in mid-October, just after the House voted to formally open an impeachment inquiry, found that 48 percent of the public supported the decision to hold hearings. But as the chart below shows, support for impeachment didn’t continue to tick upward. In mid-December, when the House voted to impeach Clinton on two counts of perjury and obstruction of justice, just about 40 percent of the public continued to think he should be impeached — and the same was true in February, when the Senate voted to acquit him.

This didn’t stop Republicans from raking Clinton over the coals in the lead-up to the 1998 midterm elections, though. That’s perhaps because there was one segment of the public that did see an uptick in support for impeachment — Republican voters. In mid-August 1998, an ABC News poll found that only 38 percent of Republicans thought Clinton should be impeached and removed from office. But by the time the House had voted to impeach him, about two-thirds of Republicans were on board. The GOP’s attacks, though, didn’t seem to have the effect of boosting overall support for impeachment; if anything, it just resulted in a widening partisan divide.

Clinton’s presidential approval ratings were also high when the scandal started to unravel, and they remained remarkably undented throughout the impeachment process. Approval of his job performance had been hovering between 60 and 70 percent through most of 1998, and with the exception of a small dip around the time the Starr report was released in September, they stayed above 60 percent. In fact, according to FiveThirtyEight’s tracker of presidential approval, Clinton’s approval ratings hit 67 percent at the end of December 1998, just after he was impeached by the House. It was among the highest job approval ratings he received at any point in his administration.

There were other signs, too, that the public didn’t think Clinton should be removed from office. Republicans’ efforts to impeach Clinton appeared to be dramatically backfiring in real time — after running a slew of ads attacking Clinton in the lead-up to the midterms, they lost seats and House Speaker Newt Gingrich, who had been one of Clinton’s loudest critics, resigned the speakership.

That electoral loss has been woven, over the years, into a cautionary fable about the costs of impeachment without broad public support. But, of course, Clinton himself didn’t emerge unscathed — Americans generally disapproved of his handling of the scandal and questioned his integrity, and those sentiments may have hurt Democrats in the 2000 election. So while it’s difficult to evaluate whether the Republicans or the Democrats paid more of a price in the long term, the impeachment process clearly left a mark on both.

Some Democrats were unhappy with Clinton, but not enough to support impeachment

It wasn’t always clear that Democrats would stand by Clinton. Some distanced themselves from the president in the lead-up to the midterm elections; others even questioned whether he should resign. The initial vote to refer Starr’s report to the House Judiciary Committee for further investigation passed by an overwhelming margin. And when the House voted a few weeks later to open a formal impeachment inquiry, 31 moderate Democrats were in support. “Many Democrats were angry and frustrated that their leader had lied to them,” said Julian Zelizer, a professor of history and public affairs at Princeton University. “That softened them to the idea of at least having an investigation.”

But after a fairly brief period, the House was divided once again into familiar partisan camps. By the time the House voted on the articles of impeachment against Clinton just five Democrats voted to impeach the president. And when it was the Senate’s turn to decide whether Clinton should remain in office, only Republicans crossed the aisle, with 10 GOP senators voting to acquit Clinton on at least one of the charges.

Why did Democrats fall in line behind Clinton? The Republicans’ aggressive pursuit of impeachment — even in the absence of a clear public consensus — may have pushed Democrats to close ranks. “A significant number of Democrats thought there should be some consequence for Clinton’s behavior, like a formal censure vote,” said Philip Bobbitt, a professor of law at Columbia University and the coauthor of “Impeachment: A Handbook.” “But when it became clear that the Republicans were just going for impeachment, they became much more defensive.”

Clinton also did damage control of his own. After first trying to quickly move past the scandal, he delivered an extravagant apology for his conduct on the day Starr’s report was released, saying he had “sinned” and “repented.” That apparent contrition may have helped some Democrats rally around him, although others remained angry with him throughout the process. As late as February, Sen. Dianne Feinstein — who months earlier had said her confidence in Clinton’s credibility was “shattered” by the revelation of the affair — pushed for a bipartisan vote in the Senate to censure Clinton. But as upset as Democrats might have been with Clinton for having the affair, or for trying to conceal it, they continued to support the president, bolstered by the fact that public opinion was largely on their side.

“By the end, very few Democrats, even if they disliked Clinton, were willing to say his behavior was worthy of impeachment,” Zelizer said. “And many Republicans in the Senate had the same misgivings.”

It’s dangerous to draw too many parallels between what happened then and what’s occurring in Congress now. For one thing, the Democrats are still in the early stages of their inquiry. But experts told me that there are some lessons for today’s Democrats in the story of Clinton’s impeachment.

First, there is the risk that, like the Republicans in Clinton’s impeachment, the Democrats’ investigation into Trump could be seen primarily as an attack on a political adversary. Starr’s investigation was seen as politically motivated, and the Republicans relied almost entirely on his findings, without trying to marshal evidence of their own. “This was a process that was perceived as partisan and rushed, with very few hearings and no revelation more shocking than the fact that the president had lied,” Zelizer said. And when House Republicans pressed ahead — even after it was clear from public opinion polls and the results of the 1998 midterms that much of the public just wasn’t convinced by their arguments — it only reinforced the perception that their true motivation was to hurt Clinton.

Some of these risks are obviously present for Democrats today. With no committed Republican support so far, it’s very difficult to argue that there aren’t partisan elements to the investigation. And as with the Clinton impeachment, Republicans and Democrats are deeply divided about the president’s conduct, which could make it difficult to build a true consensus around impeachment.

The Democrats’ inquiry is different, though, in that they don’t have a completed investigation like Starr’s. Democrats had an opportunity to frame an impeachment inquiry around a completed special counsel investigation after the exhaustive findings in Mueller’s report became public, but only moved forward with impeachment after the Ukraine allegations presented a new scandal and an evolving set of facts to pursue. As a result, they may be able to avoid (or at least mitigate) the perception that they were just looking for an excuse to impeach Trump, especially as new evidence continues to emerge.

And while the allegations against Clinton were personal and moral, the conduct at issue in Trump’s case is much more closely linked to his power as president, which could mean the public will be less inclined to dismiss it as human error. “With Clinton I think a lot of people looked at themselves in a mirror and said, ‘You know, I’d lie about my affair too,’” said Jeffrey Engel, a presidential historian at Southern Methodist University. “Pressuring a foreign power to investigate a political adversary is a lot less relatable.”

It’s too early to say whether any of these parallels will hold true. But while the risks are certainly there, the Democrats are still building their case. And they also have this history as a guide — which means they may be able to avoid some of their predecessors’ mistakes, rather than repeating them.

Nathaniel Rakich contributed research.