The Twins signed free-agent catcher Jason Castro, who played six seasons for the Houston Astros, to a three-year, $24.5 million contract.

A major league baseball source confirmed the signing.

Castro, who is 6-3, 215 pounds, was an American League All-Star in 2013, when he batted .276 with 18 home runs and 56 RBI. He has struggled to make contact since then, batting .215 over the next three seasons, including .210 last season.

Castro is considered a strong defensive catcher. He threw out 24 percent of runners attempting to steal bases last season, which is slightly below average but higher than the 19 percent shutdown rate his predecessor, Kurt Suzuki, had in 2016.

Framing pitches is Castro's strength. He had 96 more strikes called last season than what was expected, according to StatCorner.com. That was fifth best among all catchers. Suzuki was minus-38 in the same category.

In that regard, Castro is a major upgrade. And if there is a position where it's acceptable to sacrifice offense for defense, it's at catcher.

Twins pitchers liked throwing to Suzuki and how he called games. But they should immediately benefit from Castro's moxie behind the plate. The staff's 5.08 ERA was the worst in the American League, better only than Arizona's 5.09.

Castro, 29, hit 210 with 11 home runs in 113 games for the Astros last season. In 617 major league games, the lefthanded hitter has 62 home runs, 212 RBI and a .232 batting average.

A native Californian, Castro was selected in the first round (10th overall) of the 2008 amateur draft by the Astros out of Stanford and signed a month later. He was called up to the big leagues in 2010, but missed the entire 2011 season after knee surgery to repair an ACL torn during spring training.

Suzuki spent three seasons with the Twins, making the All-Star team in 2014. He hit .258 with eight home runs and 59 RBI last season and failed to play enough to trigger an option for 2017. It was a foregone conclusion that he would not be brought back next season.

Adding Castro relieves the headache of stabilizing the position. The Twins felt they had the right formula going into last season when they dealt Aaron Hicks to the Yankees for John Ryan Murphy. The plan was to work Murphy in, take some workload away from Suzuki then have Murphy take over in 2017.

Then-GM Terry Ryan even told fans at TwinsFest in January that Murphy could develop into a Jonathan Lucroy-type catcher. Murphy, however, struggled mightily at the plate and eventually was sent down to Class AAA Rochester.

Juan Centeno ended up as the backup catcher. While he showed pop in his bat, he struggled behind the plate, failing to keep balls in the dirt in front of him that ended up being scored as wild pitches. Centeno was claimed off waivers last week by Milwaukee as the Twins set their 40-man roster.

The club added prospect Mitch Garver to the 40-man last week. Garver, a ninth-round pick out of New Mexico in 2013, has been solid with the bat but has steadily improved behind the plate. He hit .329 in 22 games with Rochester after being promoted last season. He is the best catching prospect in the organization. Castro's signing allows the club to not rush Garver.

Once Castro joins the Twins, their 40-man roster will be full, but they are expected to make room before the Rule 5 draft on Dec. 8. in case there is someone in whom they are interested.

The catching market this offseason has been considered thin. Matt Wieters, represented by Scott Boras, is expected to seek top dollar. Wilson Ramos, who signed with the Twins out of Venezuela but was traded to Washington, might be the best all-around catcher on the market. But he tore an ACL late in the season will miss several months.

The Astros recently traded with the Yankees for catcher Brian McCann.