David Ortiz will remain a member of the Boston Red Sox after the All-Star slugger and the team agreed to terms on a two-year contract just prior to the start of free agency.

Financial terms of the deal were not disclosed, though Comcast SportsNet New England reported the pact is worth $26 million guaranteed and contains additional incentives that could push the total value to $30 million.

Despite being limited to just 90 games due to a right Achilles injury, Ortiz belted 23 homers and knocked in 60 runs while batting .318, his highest average since 2007.

Since joining the Red Sox prior to the 2003 campaign, the standout designated hitter has averaged 34 homers and 109 RBI while batting .290 over 10 seasons and has been selected an American League All-Star eight times over that span.

Ortiz, who turns 36 on November 18, would have been a free agent at 12:01 a.m. (ET) on Saturday, and FoxSports.com reported on Thursday that the Texas Rangers had an interest in the veteran as a possible replacement for free- agent outfielder Josh Hamilton.

The Red Sox did give Ortiz a qualifying offer prior to Friday's deadline, the only one of the team's free agents to receive one. Boston did not tender offers to outfielders Cody Ross and Scott Podsednik, pitchers Aaron Cook, Daisuke Matsuzaka and Vicente Padilla and first baseman James Loney.