ST. PETERSBURG., Fla. (AP)The Rays finalized right-hander Zach Eflin’s $40 million, three-year contract on Tuesday, the largest deal for a free agent in Tampa Bay history.

He will make $11 million next season, $11 million in 2024 and $18 million in 2025. Eflin would get a one-time $1 million assignment bonus if traded.

Eflin, who spent portions of seven seasons with the Phillies, joins a rotation that includes All-Star lefty Shane McClanahan, and right-handers Tyler Glasnow and Drew Rasmussen.

Tampa Bay was an AL wild card team in 2022, but got swept by Cleveland in the opening round. The Rays were outscored 3-1 in the two-game set.

”We’ve spent a lot of time since our disappointing postseason exit talking about our runs scoring,” Rays president of baseball operations Erik Neander said. ”I think that we made this commitment to Zach while our offense and that being such a focus should speak that much more highly to how much we appreciate Zach and how much we wanted him here.”

The 28-year-old began last season in the Philadelphia Phillies rotation but made his last start on June 25 and was sidelined by right knee soreness. He returned on Sept. 14 and made seven appearances out of the bullpen with a 1.17 ERA, then had a 3.38 ERA over 10 2/3 innings in 10 postseason relief outings.

Eflin’s 2021 season was cut short by a torn patellar tendon in his right knee that required surgery. He had surgery on both knees in 2016.

”We do a full medical workup on everybody,” Tampa Bay general manager Peter Bendix said. ”We’re very through with that, got a lot of perspectives, and feel confident that the best is yet to come for him.”

Overall, the 6 foot 6, 220 pounder has a 36-45 record with a 4.49 ERA in 115 starts and 12 relief appearances/

The Orlando-area native was a Rays fan growing up, went to games at Tropicana Field and took part in a workout for the team before being selected by San Diego 33rd overall in the 2012 amateur draft.

”A little heartbroken,” Eflin said. ”I think the guys made up for it. This is really cool for me.”

The $40 million commitment to Eflin is the largest the budget-minded Rays have made to a free agent, surpassing the $35 million, five-year contract pitcher Wilson Alvarez signed in 1998, and the $30 million, two-year deal right-hander Charlie Morton received in 2019.

To make room on the 40-man roster, the Rays designated reliever J.P. Feyereisen for assignment. The right-hander underwent right shoulder surgery on December 7 for a general cleanup of the rotator cuff and labrum.

Feyereiser allowed one unearned run and seven hits in 24 1/3 innings over 22 appearances in 2022 before being shut down June 2 due to right shoulder impingement.

AP MLB: https://apnews.com/hub/mlb and https://twitter.com/AP-Sports