Right-hander Michael Wacha has agreed in principle to a contract with the San Diego Padres, according to two people with knowledge of the deal.

The people spoke with The Associated Press on the condition of anonymity on Tuesday because the deal was still being finalized and pending Wacha passing a physical. The contract was believed to be for multiple years, similar to what the Padres gave right-hander Nick Martinez last year, and both people described it as ”complicated.”

The 31-year-old Wacha was 11-2 with a 3.32 ERA in 23 starts for the Boston Red Sox last year. The Padres will be his fifth team. He spent his first seven seasons with the St. Louis Cardinals and was selected MVP of the 2013 NL Championship Series as a rookie. He also pitched for the New York Mets and Tampa Bay Rays.

The Padres had been looking to add a starter and appear to be leaning toward starting the season with a six-man rotation. Wacha will join a rotation that includes Yu Darvish, Joe Musgrove, Blake Snell, Martinez and Seth Lugo.

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