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

Maddon agreed to a three-year deal to become the Angels’ manager on Wednesday, reuniting the World Series-winning former boss of the Cubs with the organization with which 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.”

The Angels will formally introduce the 65-year-old 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 team’s interim manager. He was the Angels’ bench coach alongside manager Mike Scioscia during their 2002 championship season.

“I could not be more excited to come back home and manage this great organization,” Maddon said. “I’d like to thank [owner] Arte Moreno, Billy Eppler and [president] John Carpino for giving me the opportunity to add another chapter to my Angels career. I was lucky enough to be a part of the first Angels team to win a World Series title, and I look forward to the opportunity to bring Angel fans their second championship.”

Maddon left to manage Tampa Bay in 2006 for nine mostly successful seasons, followed by a big-money move to Chicago to make history in 2016, leading the Cubs to their first World Series title in 108 years.

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.

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

The Angels also interviewed ex-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 candidate for other managerial openings, but he was clearly eager for a reunion.