The Houston Astros have locked up a key cog in their bullpen.

The team and reliever Rafael Montero agreed to a three-year, $34.5 million deal just a week after the reliever helped the Astros win their second World Series title, according to multiple reports.

Montero had by far the best season of his career, pitching to a 2.37 ERA out of the pen. In his 10 appearances in the postseason, the first of his career, he allowed just two earned runs in 9.1 innings (1.93 ERA).

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

Rafael Montero pitching

Rafael Montero of the Houston Astros delivers a pitch against the Philadelphia Phillies during the eighth inning in Game 5 of the 2022 World Series at Citizens Bank Park Nov. 3, 2022, in Philadelphia. (Elsa/Getty Images)

Montero's turnaround was one of the biggest surprises in the majors this year. Before being traded to Houston last year, he had a career ERA of 5.29 with three separate teams: the New York Mets, Texas Rangers and Seattle Mariners.

Despite his struggles throughout his career, Houston took a flier on him and his then-7.27 ERA that year, and he immediately became a dominant force in an already stout bullpen.

Montero was traded along with Kendall Graveman at last year's trade deadline, a move that upset Mariners players because Graveman had been so good for them. Now that Montero is turning his career around, Seattle has another reason to hate the trade.

Rafael Montero celebrates World Series

Ryan Pressly, Héctor Neris and Rafael Montero of the Houston Astros celebrate with the World Series trophy in the clubhouse after the Astros defeated the Phillies, 4-1, in Game 6 of the 2022 World Series at Minute Maid Park Nov. 5, 2022, in Houston.  (Daniel Shirey/MLB Photos via Getty Images)

ASTROS PART WAYS WITH GENERAL MANAGER JAMES CLICK SIX DAYS AFTER WINNING WORLD SERIES

The 32-year-old only made six appearances with the Astros in 2021 due to right shoulder discomfort ending his season in August. In those outings, he didn't allow a run in six innings. That was just a preview of what was to come in 2022.

The signing comes just a day after the Astros and general manager James Click parted ways despite winning it all just a week ago.

Montero was part of the Astros' combined no-hitter in Game 4 of the World Series along with Cristian Javier, Bryan Abre and Ryan Pressly.

Montero owned a 2.48 ERA in 2018 with the Rangers, but every other season he pitched his ERA was over 4.00, and he had two seasons with an ERA over 6.00.

Bryan Pena and Astros pitchers

Rafael Montero, Bryan Abreu, Cristian Javier, Christian Vázquez and Ryan Pressly of the Houston Astros pose for a photo after their combined no-hitter against the Phillies in Game 4 of the 2022 World Series at Citizens Bank Park Nov. 2, 2022, in Philadelphia. (Daniel Shirey/MLB Photos via Getty Images)

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

Instead, he will now be part of the most elite bullpen in baseball through 2025.