Right-hander Michael Pineda is returning to the Minnesota Twins, as the sides have reached an agreement on a two-year, $20 million contract, sources told ESPN’s Jeff Passan.

FOX 9 of Minneapolis was first to report on the agreement.

Pineda will begin the 2020 season serving the remainder of a 60-game suspension that began in early September. He originally was given an 80-game ban after testing positive for the banned diuretic hydrochlorothiazide, which can mask other substances, but the penalty was reduced to 60 upon appeal.

The 6-foot-7, 280-pound right-hander has about five weeks of the suspension left to serve, which means he’ll be available for only five months of the coming season. Pineda apologized to the Twins following the ban for his “error in judgment,” saying he was given an over-the-counter medication by an acquaintance to help manage his weight.

The suspension was a big blow to the rotation for the AL Central champion Twins. One of the team’s steadiest starters, Pineda likely would have been near the top of the team’s playoff rotation. Instead, the Twins were swept by the New York Yankees in the AL Division Series.

Pineda’s presence in the rotation was one of the most underappreciated improvements made by the Twins in 2019. Before the suspension, in his 26th start of the season, Pineda reached double-digit strikeouts for the first time since April 10, 2017, when he was with the Yankees. Pineda missed the second half of that season and, after signing with the Twins, all of 2018 while recovering from Tommy John surgery.

In 14 starts prior to the suspension, Pineda was 10-4 with a 2.96 ERA and 87 strikeouts in 82 innings. His success was attributed to better command and a much-improved changeup.

Pineda, who was 11-5 with a 4.01 ERA for the season, pitched 146 innings and missed bonus opportunities of $500,000 apiece for 150 innings and each additional 10 through 200. He had to forfeit $989,247 of his $8 million salary last season due to the ban.

In 2014, Pineda was suspended 10 games while with the Yankees for putting pine tar on his neck to help get a better grip during a game against the Boston Red Sox.

Pineda was traded to the Yankees by the Seattle Mariners after a spectacular 2011 debut season that saw him finish fifth in AL Rookie of the Year voting and earn an All-Star selection.

Overall, Pineda is 51-46 with a 4.04 ERA and 827 strikeouts in six seasons with the Twins, Yankees and Mariners.

ESPN’s Keith Law and The Associated Press contributed to this report.