NEW YORK (AP)The Boston Red Sox have signed right-handed reliever Garrett Whitlock to a four-year deal that runs through the 2026 season, with club options for 2027 and ’28.

The deal was announced Sunday by chief baseball officer Chaim Bloom before Boston played the finale of a three-game series against the rival New York Yankees. Financial terms weren’t announced.

The Red Sox poached Whitlock from the Yankees in the Rule 5 draft ahead of the 2021 season. A starter in the minors, the 25-year-old Whitlock moved to the bullpen and led all Boston pitchers with a 1.96 ERA over 73 1/3 innings. He was 8-4 with 81 strikeouts and 17 walks while frequently pitching multiple innings per appearance.

Among 30 rookies who pitched at least 70 innings last year, Whitlock ranked first in ERA, second in WHIP at 1.10, and third in opponent OPS at .631.

Whitlock allowed a run over 2 1/3 innings in relief on opening day against New York, striking out four and allowing a homer to DJ LeMahieu in a 6-5 defeat.

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