The Los Angeles Dodgers changed the complexion of the back end of their bullpen on Monday, trading left-hander Caleb Ferguson to the New York Yankees and agreeing with right-hander Ryan Brasier to a two-year, $9 million contract.

Brasier’s deal, confirmed by multiple sources, is still pending the completion of a physical. Once he signs, Brasier would essentially swap places with Ferguson — obtained by the Yankees in exchange for lefty reliever Matt Gage and low-level pitching prospect Christian Zazueta Jr. — and join Evan Phillips, Blake Treinen, Brusdar Graterol and Joe Kelly among the Dodgers’ high-leverage relievers.

Brasier, 36, struggled mightily with the Boston Red Sox over the first month and a half of the 2023 season, posting a 7.29 ERA in 20 appearances before his release. But he pitched brilliantly upon joining the Dodgers in early June, incorporating a cutter into his repertoire and allowing just three runs in 38⅔ innings for the remainder of the season.

Ferguson, 27, was solid in his first full season as a Dodgers reliever in 2023, posting a 3.43 ERA in 68 appearances, striking out 70 batters and issuing 23 walks in 60⅓ innings. Ferguson joins Victor Gonzalez among former Dodgers lefty relievers traded to the Yankees this offseason. Ferguson, heading into his last year before free agency, is expected to be the Yankees’ primary lefty, joining righties Clay Holmes, Jonathan Loaisiga and Tommy Kahnle in the back end of the bullpen.

The Dodgers still need to open a spot on their 40-man roster for Brasier, whose deal, according to a source, can reach up to $13 million with performance bonuses.