– An emotional Ryne Sandberg resigned as Phillies manager in his third season as Philadelphia struggles with the worst record in the major leagues.

Sandberg quit Friday with a 119-159 career record over parts of three seasons leading Philadelphia, including 26-48 this year. His only full season was in 2014, when the Phillies finished 73-89.

"With some changes at the top looming, I did not want to be in the way of anything happening and progress going forward," Sandberg said.

Third base coach Pete Mackanin will take over as interim manager. The former Twins player is 53-53 in parts of two seasons, with Pittsburgh in 2005 and Cincinnati in 2007.

The Phillies are expected to hire a new president soon. Pat Gillick is handling that role this season, but the 77-year-old Hall of Fame executive wants to return to a consulting position.

Sandberg sounded like a guy who knew he wasn't going to be part of the future so he left on his own terms after the Phillies won two of three at Yankee Stadium this week.

"Wins and losses was a big thing that took a toll on me," said Sandberg, who choked up while thanking fans for their support.

Sandberg, 55, was drafted by the Phillies in 1978 but was traded to the Cubs, where he became a Hall of Fame second baseman.

The Phillies gave Sandberg his first managerial job in the majors in August 2013 after they fired Charlie Manuel, who led them to the 2008 World Series title.

"Managing a team is very challenging," Sandberg said. "I enjoyed the challenge. I enjoyed coming to the ballpark every day."

General Manager Ruben Amaro Jr. could be next to go once the new president takes over.

"I don't think Ryne should feel that he should shoulder all the blame," Amaro said. "We win and lose as a team. I also take responsibility for the things that are happening on the field."