(Reuters) - The Boston Red Sox and David Ortiz agreed a two-year $26 million deal on Monday that could keep the popular slugger in Beantown for the remainder of his career.

A fan favorite in Boston, Big Papi has slammed 343 homers and amassed 1,088 RBIs in 10 seasons with Boston.

"David Ortiz has been one of the most positive influences in Red Sox history," said principal owner John Henry on MLB.com.

"He has been a leader among his team mates, a favorite among the fans and a powerful force in the middle of lineups that have produced so much joy and happiness for New England.

In 16 Major League campaigns, the first six spent in Minnesota, Ortiz has 401 home runs and 1,326 RBI.

He has averaged more than 30 home runs and 100 RBI during his time in Boston but last season the 36-year-old Dominican was slowed by an Achilles injury and appeared in just 90 games, hitting 23 homers and driving in 60 runs.

"David Ortiz has made immeasurable contributions to the Red Sox for the past decade," general manager Ben Cherington said in a news release. "He is an historic figure, a beloved hero and an important player as we build our team for 2013 and beyond."

Ortiz has been part of two World Series championship teams in Boston lifting the title in 2004 and 2007 but also watched the franchise fail to make the post-season the last three years, a last place finish in the American League East this season promoting a massive rebuild.

Ortiz's signing is the second major announcement in two weeks for the Red Sox, who have had a busy off-season, sacking manager Bobby Valentine and replacing him with Toronto Blue Jays John Farrell.

(Reporting by Steve Keating in Toronto, editing by Ed Osmond)