ANAHEIM, Calif. — Joe Maddon is back under the halo.

Maddon agreed to a three-year deal to become the Los Angeles Angels’ manager on Wednesday, reuniting the World Series-winning former manager of the Cubs with the organization where he spent the first three decades of his baseball career.

“We are thrilled that Joe is coming back home and bringing an exciting brand of baseball to our fans,” general manager Billy Eppler said. “Every stop he has made throughout his managerial career, he has built a culture that is focused on winning while also allowing his players to thrive. We believe Joe will be a great asset for our club and look forward to him leading the team to another World Series championship.”

OFFICIAL: The Los Angeles Angels have agreed to terms with manager Joe Maddon. pic.twitter.com/PKZHBaljl8 — Los Angeles Angels (@Angels) October 16, 2019

The Angels will formally introduce the 65-year-old Maddon at a news conference next week, but he already knows his way around Angel Stadium.

Maddon signed with the Angels as an undrafted catcher in 1975, and he spent the next 31 seasons working at almost every level of the organization as a player, coach and manager. He served as a big league assistant coach under five managers, and he had two stints as the Angels’ interim manager.

He was the Angels’ bench coach alongside manager Mike Scioscia during their championship season in 2002. He left to manage Tampa Bay in 2006 for nine mostly successful seasons, followed by a big-money move to Chicago to make history.

The three-time Manager of the Year left the Cubs by mutual consent last month after they missed the playoffs for the first time in his five-year tenure. He’ll still likely never have to buy a drink in Chicago again because of 2016, when he led the Cubs to their first World Series title in 108 years.

The Cubs have interviewed several candidates to replace Maddon, including David Ross, Joe Girardi and Gabe Kapler.

Maddon replaces Brad Ausmus, who was fired after one season when the Angels finished 72-90, their worst record since 1999. Ausmus was abruptly dismissed shortly after Maddon became available, and most observers assumed Angels owner Arte Moreno had his eye on a reunion with Maddon, who was the Angels’ bench coach when Moreno bought the club in 2003.

The Angels also interviewed veteran managers John Farrell and Buck Showalter and Padres hitting coach Johnny Washington for the job, but Maddon was the choice. Maddon was expected to be a valued candidate for other managerial openings around the majors, but he was clearly eager for a reunion.

Maddon kept a home in Long Beach during his 14 seasons away from Anaheim, and he has fond feelings for the organization that gave him his start.

That organization is experiencing hard times: The Angels have endured four straight losing seasons for the first time since the 1970s, and they still haven’t won a playoff game with Mike Trout and Albert Pujols on their roster, making just one three-game postseason appearance after winning the AL West in 2014.

The Angels also were rocked this month by revelations about the role of a team employee in procuring opioids for pitcher Tyler Skaggs, who was found dead in his hotel room July 1.

The problems didn’t deter Maddon from reuniting with the Angels, where he inherits a roster with Trout as its centerpiece. The probable three-time AL MVP is signed to a 12-year, $426.5 million contract that should keep him in Anaheim for the bulk of his career.

The Angels’ starting pitching was easily their biggest weakness in 2019, but the rotation will benefit next season from the return of Shohei Ohtani, the two-way star who spent this year solely as a designated hitter while recovering from Tommy John surgery. Eppler also will attempt to be active in the free agent market to supplement a roster finally starting to bear fruit from Eppler’s years of rehabilitating a barren farm system.

Maddon’s managerial career away from Anaheim began with two losing seasons in Tampa Bay, but has been impressive ever since. The Rays made a 31-game improvement and won the AL pennant in 2008, leading to the first of Maddon’s three Manager of the Year awards.

He had five 90-win teams in Tampa Bay and four more in Chicago, including the 103-win Cubs who went on to that historic World Series victory. Maddon has received praise for his combination of a charismatic, old-school baseball personality and a willingness to adapt to the new world of analytics and statistical decision-making.