Boston Red Sox general manager Theo Epstein is heading to a bigger city with a higher job title.

Epstein, 37, has agreed a five-year contract to join the Chicago Cubs, the Associated Press, WEEI Radio in Boston, SI.com and ESPN.com reported Wednesday.

The deal is worth roughly $20 million US, reported ESPN.com, and includes the Cubs picking up the conclusion bonus in Epstein's contract. He has one year left on his deal with Boston.

All that is left to decide, said both media outlets, is the Cubs and Red Sox agreeing to compensation that ESPN reported would involve prospects and/or cash and not major league players.

A job title for Epstein also hadn’t been agreed upon early Wednesday, according to WEEI, but it’s been assumed he will have a larger title than he had with the Red Sox, executive vice president/GM.

The Cubs fired general manager Jim Hendry on Aug. 19 and finished 71-91. They have been pursuing Epstein, who just finished his ninth season with Boston. The Red Sox missed the playoffs following a record collapse, going 7-20 in September.

Epstein would be going to a Cubs franchise that hasn't won the World Series since 1908. Boston hadn't won a championship since 1918 until doing it in 2004, Epstein's second year as GM. The Red Sox also won it all in 2007.

No team has blown a bigger lead in September and missed the playoffs. Boston did not win consecutive games at any point in the month.

It was a startling fall for the Red Sox and Epstein, a native of the Boston area who became baseball's youngest GM ever when he was appointed in 2003.

But in recent years he's been criticized for giving long-term, costly contracts to free agents J.D. Drew, John Lackey and Carl Crawford, none of whom came close to meeting expectations.