The Boston Red Sox have come to terms with veteran pitcher Carlos Martinez on a minor league contract deal, as per the team’s transaction wire.

Martinez is slated to join the Worcester Red Sox, which serves as the organization’s Triple-A team. The two-time All-Star is already listed on Worcester’s roster, although it is currently up in the air as to when he will make his debut with the team.

Martinez joins the Red Sox organization after a nine-year stint with the St. Louis Cardinals, where he emerged as a starting pitcher before later reverting to a role as a reliever. In his final two campaigns in St. Louis, he returned to the starting rotation, logging 21 total starts to go along with a 6.95 ERA posted in 102.1 innings pitched.

Martinez pitched in his final game with the Cardinals last July, as a torn thumb ligament in his right hand put an end to his season. He wound up undergoing season-ending surgery to repair the ligament, and he has since made a full recovery from the injury.

The Cardinals had a notable opportunity to keep Martinez on the team via a $17 million club option but opted to decline it in early November, which then made him a free agent.

Martinez would go on to sign with the San Francisco Giants as a free agent in March. He put pen to paper on a deal where he would earn $2.5 million if he ended up making the roster, and the agreement also included $1.5 million in incentives. In the end, he did not appear in a single game for the Giants in the majors or minors, and the team granted his release last month.

Martinez had originally signed with the Red Sox back in 2009, but his agreement with team officials was voided by MLB. Now, 13 years later, Martinez is back in the Red Sox organization, where he could possibly have an opportunity to soon make a return to the majors.

As it stands, the Red Sox are currently without three starting pitchers in Chris Sale (rib injury), James Paxton (elbow soreness) and Rich Hill (COVID-19 related injury list).