Updated

The Boston Red Sox have reportedly worked out a deal to hire John Farrell as their next manager.

The 50-year-old Farrell worked as the manager for the Toronto Blue Jays the previous two seasons. He compiled a 154-170 record, including a 73-89 mark in 2012.

Farrell was under contract with Toronto through the 2013 season, but the Red Sox and Blue Jays have reportedly arranged compensation for the former major league pitcher to return to Boston.

Several media outlets report the Red Sox will send the Blue Jays infielder Mike Aviles to Toronto as compensation for Farrell.

The Boston Globe reports Farrell received a two-year contract and he will be introduced at Fenway Park Monday or Tuesday.

Farrell worked as the pitching coach for the Red Sox in 2007-10 prior to taking the job with the Blue Jays.

The Red Sox needed a replacement for Bobby Valentine, who was fired after just one season on the job. Boston finished the 2012 season last in the American League East with a record of 69-93, the worst for the storied franchise since a 62-100 mark in 1965.

The Red Sox also interviewed Los Angeles Dodgers third base coach Tim Wallach, New York Yankees bench coach Tony Pena, San Diego Padres special assistant Brad Ausmus and Baltimore Orioles third base coach DeMarlo Hale.

Aviles hit .250 with 13 homers and 60 RBI in 136 games this season.