The Boston Red Sox are finalizing the terms of a two-year deal with free agent designated hitter David Ortiz that they hope to announce before the end of the week, according to a baseball source.

The two-year term -- something that was of utmost importance to the 36-year-old Ortiz -- has already been agreed upon, the source said Tuesday, but the sides are still haggling on compensation.

Ortiz is believed to be seeking a total of $25 million. The Red Sox are in that neighborhood, but hope to sign him for a few million less, according to the source, who noted the monetary negotiations are not expected to get in the way of the deal's completion.

The Red Sox hope to announce the extension as soon as Friday, the first off day of the World Series. The league frowns upon teams announcing news on days of World Series games.

Ortiz's agent, Fern Cuza, spoke with the Red Sox on Monday, the source said, and representatives for the team -- including Ben Cherington and newly hired manager John Farrell -- talked with Ortiz on Tuesday at Fenway Park.