The Royals and free agent starting pitcher Edinson Volquez have agreed to terms on a two-year, $20 million contract. Volquez spent last season with the Pittsburgh Pirates.

The Royals and free agent starting pitcher Edinson Volquez have agreed to terms on a two-year, $20 million contract, according to multiple reports. Chris Cotillo of SB Nation was the first to report the two sides were close to a deal.

Volquez spent last season with the Pittsburgh Pirates and had a bounce-back year, going 13-7 with a 3.04 ERA in 31 starts and 32 total appearances. He recorded a combined 5.71 ERA in 2013 while pitching for the San Diego Padres and the Los Angeles Dodgers.

The 31-year-old has pitched for two other teams in his career. After coming up in the Texas Rangers' system, Volquez was sent to the Cincinnati Reds as part of the Josh Hamilton deal and was an All-Star in his first season with the Reds in 2008, going 17-6 with a 3.21 ERA.

• SPAN: Altuve proves big things can come in small packages

Volquez had Tommy John surgery in 2009 and was suspended 50 games in 2010 while injured for testing positive for performance-enhancing drugs. After a poor performance in 2011, which included a demotion to Triple A, Volquez was traded to the Padres in the deal that netted Cincinnati fellow starter Mat Latos.

Over his 10-year career, Volquez is 66-59 with a 4.44 ERA.

The Royals have had an active offseason. In addition to seeing designated hitter Billy Butlerleave for the Oakland A's, and with rightfielder Nori Aoki also likely to leave in free agency, Kansas City signedKendrys MoralesandAlex Rios as their respective replacements.

•​ JAFFE: JAWS: Garciaparra's peak likely not enough for Hall

Volquez will likely serve as a replacement for starter James Shields, who isn't expected to return to the team.

The Royals went 89-73 last season and lost the World Series in seven games to the San Francisco Giants. It was the team's first trip to the playoffs and World Series since 1985.

- Ben Estes