CHICAGO (AP) — Chicago Cubs manager Lou Piniella announced Tuesday that he will retire at the end of the season, ending an often colorful career that included 18 years in the majors as a player and another 22 as a manager.

The 66-year-old Piniella said he was looking forward to spending more time with his family.

"I've grown to love the city and the fans but at my age it will be time to enter a new phase in my life," Piniella said in a statement released by the team.

Announcing his retirement now, Piniella added, gives the team time to find a replacement.

"I'm proud of our accomplishments during my time here and this will be a perfect way for me to end my career," he said. "But let me make one thing perfectly clear: our work is far from over. I want to keep the momentum going more than anything else and win as many games as we can to get back in this pennant race."

Piniella is in the fourth and final year of his contract with the Cubs. After leading the Cubs to consecutive NL Central titles in 2007-08, Piniella and his team missed the playoffs last year and have struggled again this season with a new owner, the Ricketts family, in charge. The Cubs have gone 102 years without a World Series title.

Piniella led the New York Yankees (1986-88), Cincinnati (1990-92), Seattle (1993-2002) and Tampa Bay (2003-05) before arriving in Chicago. He won the World Series as a manager with Cincinnati after winning two as a player (1977-78, Yankees).

A right-handed outfielder, Piniella was the AL Rookie of the Year in 1969 after batting .282, 11 home runs and 68 RBIs with the Royals. He was traded to the Yankees in 1973 and ended his playing career with New York in 1984.

Piniella trails only Tony La Russa, Bobby Cox and Joe Torre in victories among active managers. His World Series title with the Reds in 1990 was the first for the team since 1976. Piniella was at perhaps his most successful as manager of the Mariners, piling up 840 wins and four postseason appearances in 10 years.

The Cubs brought in the fiery Piniella in 2006 to replace Dusty Baker. They knew he was demanding and occasionally combustible — especially in arguments with umpires — but liked his track record of winning. He agreed to a three-year contract worth nearly $10 million, with an option for a fourth year, after spending time in the TV booth.

Piniella had become frustrated in his previous stop at Tampa Bay in 2005 when he didn't get the personnel improvements he thought he needed. He quickly won over the rabid Cubs fans by guiding the team to 85 wins in 2007 — a 19-game improvement from 2006. The Cubs won 97 games the next year.

Last season and this season have not been as good for Piniella and the Cubs. Through Monday, the team was 10½ games out of first place in the NL Central.