The Cardinals did something they rarely do when they reached agreement today with first baseman Allen Craig, who was not yet arbitration eligible, on a five-year contract taking him through 2017 with a club option for 2018.

Financial terms of the contract were not disclosed.

General manager John Mozeliak said in a statement, “(Craig) has been a productive middle of the lineup hitter throughout his professional career and we look forward to Allen’s continued contributions.”

Craig, 28, hit .307, banged 22 homers and drove in 92 runs last season despite missing the first month of the season after knee surgery. His .400 average with runners in scoring position was the best in the majors.

In the Cardinals’ World Series championship season in 2011, Craig hit three homers and had four overall that postseason.

An eighth-round pick from California in 2006, Craig has a career .300 average.