The shocking elimination of the Dodgers in Game 5 of the NLDS on Wednesday creates an opening for the Red Sox to pursue their white whale -- Andrew Friedman.

L.A.'s president of baseball operations is widely considered the shrewdest executive in the game, and he has built a juggernaut out west, with the Dodgers simultaneously cutting payroll and competing for World Series titles on an annual basis.

His contract happens to be up, and there's some unease about why he hasn't yet agreed to an extension. A couple of weeks ago, all involved expressed optimism to the L.A. Times that Friedman would return, albeit in less than absolute terms; president Stan Kasten said he was "pretty confident" Friedman would be back.

And if he's not? Expect the Red Sox to be first in line.

The 42-year-old cut his teeth over a decade ago with the Rays, becoming their general manager in 2005 at age 28 and building the 2008 team that beat the Red Sox in the ALCS to reach the World Series. Friedman worked wonders in the small-market setting en route to four playoff appearances before joining the Dodgers in 2014.

All he has done since is build one of the game's most sustainable success stories. L.A. has won seven straight division titles, first by spending limitless amounts of money -- their $291 million payroll in 2015 remains the highest ever -- and then by doing it in a way that should certainly capture the attention of Red Sox owner John Henry.

From that high four years ago, the Dodgers have steadily dropped, culminating in 2018, when they dropped below the luxury tax threshold with a $195 million payroll to reset their penalties. They barely surpassed the limit this year, checking in at about $210 million. That's where Henry would like to get the Red Sox, who hope to drop from $242 million to $208 million.

Friedman did it by building a powerhouse player development system that has produced stars like MVP favorite Cody Bellinger, All-Star right-hander Walker Bueller, and slugging shortstop Corey Seager. Friedman's Dodgers have also been opportunistic on the margins, adding stalwarts Max Muncy and Justin Turner for nothing after they were jettisoned by the A's and Mets, respectively.

The Dodgers are set up to maintain their success, too, with $113 million committed to next season, $89.5 million on the books in 2021, and only $20 million committed to 2022 (per Baseball-Reference). Compare that to the Red Sox, who have $118 million in guarantees committed to 2022 as part of a bloated payroll that's the reason they're seeking new leadership in the first place.

The Dodgers do not have a single player on a $100 million contract. Their highest-paid player is left-hander Clayton Kershaw, who signed a three-year, $93 million extension before this season. His two remaining years are eminently more manageable than, say, the five years for Chris Sale staring at the Red Sox.

In Los Angeles, Friedman built an All-Star front office featuring no fewer than five former GMs: Josh Byrnes, Alex Anthopoulos, Tommy Lasorda, Ned Colletti, and Gerry Hunsicker. He hired liberally from the Red Sox, stealing respected figures like Dave Finley and Galen Carr. He has built the Dodgers into an analytics-driven powerhouse, which is how they ended up on the forefront of the launch angle revolution.

Friedman has proven he can win with baseball's smallest payroll and its largest payroll. He has laid out a blueprint for shedding salary while remaining competitive -- his first act as Dodgers boss was to rid the organization of bloat like Hanley Ramirez, Matt Kemp, and Dan Haren, acquiring young talent such as Yasmani Grandal and Kike Hernandez in return -- and it's hard to imagine a more qualified candidate emerging for the task now confronting the Red Sox.

The Dodgers could render this entire discussion moot by agreeing to an extension with Friedman tomorrow. But until that happens, consider him the most important free agent of the offseason if you're the Red Sox.

Click here to download the new MyTeams App by NBC Sports! Receive comprehensive coverage of your teams and stream the Celtics easily on your device.

The perfect Red Sox GM candidate just became a free agent -- Dodgers boss Andrew Friedman originally appeared on NBC Sports Boston