Just three years ago, the Boston Red Sox were in shambles. A disappointing 78-win season — their second losing campaign in a row — landed the Sox in last place for the third time in four years. What once looked like a wild roller-coaster ride between good and bad seasons had simply left Boston stalled-out, stranded on the track by disappointing performances. Only a couple of seasons old, the team’s 2013 world championship already felt like a distant memory.

Ever since then, all the Red Sox have done is compile the best record in baseball, headlined by this season’s incredible 79-34 run — which includes last weekend’s four-game sweep of their bitter rivals, the New York Yankees, to all but seal up the American League East crown. Now the only forgotten memories are of the team’s post-World Series hangover.

It’s no accident that the sudden resurgence coincided with the hiring of Dave Dombrowski as president of baseball operations (the de facto general manager) late in the summer of 2015. Already regarded as one of the best GMs in the game, Dombrowski has solidified his reputation by quickly helping restore Boston to contending form. But Dombrowski has had help, too. He inherited plenty of talent from his predecessors — and he finally appears to have the right manager in standout rookie skipper Alex Cora. The result has been an incredible turnaround from mediocrity to magnificence in Boston.

Dombrowski is no stranger to building great ballclubs. During his first GM job, with the Montreal Expos in the early 1990s, he helped lay the groundwork for Montreal’s iconic 1994 would-be pennant winner. (Nearly half of that team’s wins above replacement were from players acquired during Dombrowski’s tenure as either Montreal’s GM or, before that, farm director.) Then he moved on to the expansion Florida Marlins, where he assembled a world champion within the first five seasons of the team’s existence.

After infamously blowing that team to bits at ownership’s insistence, Dombrowski set about constructing yet another contender from scratch. Although he left Florida for the Detroit Tigers two years before the Marlins won another title in 2003, almost half of that championship roster’s value also joined Florida’s roster while Dombrowski was GM. Before he even turned 50, Dombrowski already had a significant hand in putting together three champions.

Detroit never won a title with Dombrowski at the helm — and, unlike in his previous stops, the Tigers weren’t left in championship-ready condition after his departure. But he did help build up Detroit from a laughingstock that lost an astonishing 119 games in 2003 (his second season as team president and GM) to an AL pennant winner within three years. At their peak under Dombrowski, from 2006 to 2014, the Tigers averaged 87.8 wins per season and made four American League Championship Series appearances, winning twice.

Dave Dombrowski’s greatest hits Selected teams that Dave Dombrowski helped assemble as team president, general manager or farm director, with share of team wins above replacement (WAR) produced by players Dombrowski acquired Season Team Record Total WAR Share of WAR Acquired By Dombrowski 2018 Red Sox 79-34 41.4 43.7% 2012 Tigers 88-74 43.5 100.0 2006 Tigers 95-67 43.8 85.9 2003 Marlins* 91-71 41.4 46.1 1997 Marlins 92-70 37.2 100.0 1994 Expos* 74-40 36.1 46.1 1990 Expos 85-77 35.5 45.5 * Dombrowski was former GM, having left team several seasons prior. Sources: Baseball-Reference.com, Fangraphs

When Dombrowski joined the Red Sox in 2015, the team was plagued by a combination of unmet expectations and an overhyped talent base. FanGraphs’ depth charts — which combine projections from the ZiPS and Steamer systems — had foreseen Boston winning 90 games in 2014 (it won only 71 instead) and had called for 86 wins in 2015 (it won only 78). Research shows that some of these violent fluctuations are random in nature, but after two seasons of underperformance in a row (plus a third, the Sox’s miserable 69-win 2012 campaign, coming before the seeming fluke of that ’13 World Series run), something had to change in Boston, and Dombrowski was the one tasked with executing the course correction.

Part of the subsequent transition simply involved saying goodbye to a handful of highly paid veterans, some (David Ortiz, who retired after one of the great career finales in baseball history) missed more than others (Pablo Sandoval, who was released after two and a half injury-plagued seasons). As a side effect, the Red Sox would live or die with the development of a new generation of up-and-coming players, including outfielders Mookie Betts and Jackie Bradley Jr. and shortstop Xander Bogaerts. The pitching staff was overhauled from top to bottom, and there were also plenty of big-ticket expenses — free-agent contracts for David Price and J.D. Martinez, plus blockbuster trades for Chris Sale, Craig Kimbrel and Drew Pomeranz. Boston added more than $38 million in salary, going from MLB’s third-highest payroll in 2015 to its most expensive roster in 2018 — at $222 million, nearly $17 million clear of the No. 2 ranked Chicago Cubs.

Dombrowski’s moves haven’t been uniformly perfect. Critics have pointed out that he emptied what was left of the team’s farm system in those big trades for veteran stars, leaving the Red Sox as the only team with no members of MLB.com’s midseason top 100 prospects. That bodes poorly for Boston’s long-term future, but the lack of trade chips was also one of the major factors behind the team’s inability to upgrade its relievers at last week’s trade deadline — which you can bet fans will remember if Boston’s postseason run features a bullpen meltdown or two. (It also bears mentioning that Dombrowski left the Tigers’ system depleted, too, at the end of his stint in Detroit, as he attempted to keep an aging core afloat.)

The current Red Sox also continue to owe a debt of gratitude to Dombrowski’s front-office predecessors, Ben Cherington and Theo Epstein. Only 43.7 percent of the WAR produced by this year’s Boston squad comes from players acquired by its current GM. But unlike Cherington, whose signature signings (Sandoval and Hanley Ramirez) were horrendous letdowns, Dombrowski has at least managed to acquire impact stars who live up to expectations: Sale keeps mowing down opposing hitters as a member of the Red Sox, while Martinez has outpaced his ascendant 2017 season with an even greater performance this year.

Some of Boston’s success might come down to what could eventually prove Dombrowski’s best move as GM: hiring Cora as manager. Although most rookie skippers struggle with the learning curve (cough, Gabe Kapler), Cora has rarely seemed out of his depth so far this year. Tactically, his focus on controlled aggression at the plate has been credited with helping Betts elevate his game to MVP levels this season. Emotionally, Cora is also pressing the team’s buttons like a seasoned pro already — witness his quick ejection against the Yankees Friday night while sticking up for his hitters in a potential beanball war — and the Red Sox’s chemistry appears to be far healthier than in years past. (Winning a bajillion ballgames does help with that, too.) For his work this season, Cora has to be among the front-runners for the AL’s Manager of the Year award, and he could be just the seventh manager ever to win it in his debut campaign.

Now, we know that few managers in history have been able to persistently compel their players to outperform their long-term track records, and we don’t have anywhere near enough evidence to declare Cora one of those special skippers after just a season of work. But for a franchise beset with chronic underachievement earlier this decade, the fact that so many Red Sox are actually exceeding expectations this year is a welcome change, whether because of Cora’s management or Dombrowski’s eye for worthwhile investments (or simply good luck).

Either way, for Dombrowski, this could be his best shot at a championship since those Marlins won it all back in 1997. Our projections call for the Red Sox to finish the season with a staggering 109 wins, which would tie the 1969 Baltimore Orioles and 1961 Yankees for the seventh-most ever in a single season. There’s plenty of competition at the top of this year’s MLB pile, so Boston isn’t even our model’s World Series favorite out of the AL. (We give Houston a a 22 percent chance of defending its title in October.) But right now, it’s impossible to find a team playing better than the one Dombrowski started assembling out of the Red Sox’s assorted pieces and parts when he took over just three years ago.

Check out our latest MLB predictions.