It's a good time to be a Golden State Warriors fan.

The Stephen Curry- and Kevin Durant-led professional basketball team just won the NBA Championship, after a 16-1 playoff run, beating the rival Cleveland Cavaliers, who the Warriors have faced in the finals for three straight years.

The Warriors broke the NBA's regular-season wins record last year, winning 73 games and losing only nine. The previous record holder was the 1995-1996 Michael Jordan-era Chicago Bulls.

The Warriors have won two NBA championships over the past three seasons. Their dominant run over the past three years has been a source of great pride for its famously loyal and raucous fans. But it's also created a lot of new fans among the Silicon Valley techie crowd.

What many of the bandwagon fans might not know is that the Warriors used to be the league's laughingstock for years and years.

Here's a look back at the Warriors' tortured past:

Eugene Kim contributed to a previous version of this article.

The Warriors have been on a good run over the past three seasons. They just won the championship and went 16-1 in the playoffs.

That's turned a lot of people into Warriors fans. It's not hard to spot someone wearing a Warriors jersey in downtown San Francisco these days. But it was a rare sight just a couple of years ago.

The Warriors' home arena has seen a flood of celebrities and tech bigwigs show up on courtside too. Here's Oracle CEO Larry Ellison — the fifth-richest man in the world — in a suit.

And Apple executive Eddy Cue was spotted watching the Finals in his customary courtside seats. Cue has been a Warriors fan for years.

Some people think most of these fans are not real fans.

And find it strange that some of them are trying to take credit for the Warriors' turnaround.

Silicon Valley's fascination with the Warriors may be in part because it's now owned by a group mostly composed of tech investors. Majority owner Joe Lacob — a partner at famed VC firm Kleiner Perkins — has seemingly taken some credit for the team's turnaround. "We’re light-years ahead of probably every other team in structure, in planning, in how we’re going to go about things,” Lacob told The New York Times.

In any case, it's cool to be a Warriors fan these days. Twitter CEO Jack Dorsey, for example, says he wants to run Twitter like the Warriors. He called Twitter COO Adam Bain the company's Steph Curry.

But it wasn't always cool to be a Warriors fan.

Until two years ago, the Warriors were just a mediocre team, saddled with a series of disappointments, mismanagement, and drama.

After winning their last championship in 1975, the Warriors hadn't made the NBA Finals again until 2015. During that 40-year span, they made the playoffs only 13 times and had just 16 seasons with a winning record.

The team also had to deal with a number of internal rifts and fights. A star player named Latrell Sprewell choked the team's head coach in 1997 and was suspended for the whole season. He was traded to the New York Knicks in 1999 and took the team to the NBA finals that year.

Chris Webber, the Warriors No. 1 draft pick and Rookie of the Year in 1994, left after playing just one season because of a conflict with then head coach Don Nelson. Webber went on to have a 15-year, all-star career.

But perhaps the worst part is all the bad draft picks and trades the Warriors made along the way. With the top pick in 1995, they chose Joe Smith over future hall of famers like Kevin Garnett and Rasheed Wallace.

In 1996, they picked Todd Fuller when Kobe Bryant, Steve Nash, and Jermaine O'Neal were all still available.

In 1998, they picked Vince Carter, one of the most explosive shooting guards ever — only to trade him for Antawn Jamison on draft day.

They also traded away Mitch Richmond, the 1989 Rookie of the Year, breaking up the popular "Run TMC" trio. In return, they got Billy Owens, who mostly served as a role player throughout his career.

All the bad moves resulted in a series of subpar seasons. They had one surprise run in 2007, upsetting the league's best team, the Dallas Mavericks, in the playoffs. But that run didn't last long, and they lost in the second round.

The Warriors' struggles were particularly disappointing given that some of the most successful basketball legends are originally from the Oakland area. Guys like Bill Russell, Jason Kidd, Gary Payton, and Paul Pierce are all from this region.

Things started to take a turn when the Warriors drafted Steph Curry in 2009. And with a new ownership group the following year, the Warriors started to see hope.

But until 2014, the team continued to underachieve, losing in the first round of the playoffs for two consecutive years.

At the start of the 2014-2015 season, the Warriors hired Steve Kerr as their new head coach. That coincided with Curry hitting his prime and young players like Draymond Green and Klay Thompson maturing into all-star players.

The Warriors had another record-breaking season this year, especially after adding Finals MVP Kevin Durant. And their popularity keeps soaring.

They will continue to have a good run for another few years if they can sign all of their core players. And the fans will continue to root for them. The question is: Will they still be there when the team tanks again?