MILWAUKEE (AP) — Doc Rivers is finalizing a deal to take over as the Milwaukee Bucks coach a day after the firing of Adrian Griffin, a person with knowledge of the negotiations told The Associated Press on Wednesday.

Rivers and the Bucks were still negotiating on Wednesday, according to the person who spoke to the AP on condition of anonymity because no contract had been completed.

ESPN, where Rivers has worked this season an analyst, reported that Rivers has agreed to a deal in principle.

Interim coach Joe Prunty will coach the Bucks on Wednesday night when they host the Cleveland Cavaliers.

The Bucks fired Griffin on Tuesday despite owning a 30-13 record that matches the Oklahoma City Thunder and Minnesota Timberwolves for the second-best mark in the league. Milwaukee entered Wednesday 3 1/2 games behind the Boston Celtics in the Eastern Conference standings.

Griffin had never been a head coach until the Bucks hired him last summer, though he had spent 16 years as an assist. The Bucks would be replacing him with someone who has nearly a quarter-century of head coaching experience.

Rivers has plenty of Milwaukee ties, as he played for Marquette from 1980-83 and his No. 31 jersey hangs from the Fiserv Forum rafters. He also has a championship background after leading the Boston Celtics to a title in 2008 and a Game 7 Finals appearance two years later.

He didn’t have as much postseason success in later stints with the Los Angeles Clippers (2013-20) and Philadelphia 76ers (2020-23). The 76ers fired him last year after they exited in the second round of the playoffs each of his three seasons in Philadelphia.

Rivers owns a 1,097-763 regular-season record and 111-104 playoff mark in 24 seasons with the Orlando Magic (1999-2004), Celtics (2004-13), Clippers and 76ers.

His 1,097 regular-season wins put him one shy of Larry Brown for eighth most in NBA history.

Rivers would be taking over a team that is chasing its second NBA title in four years and has shown a sense of urgency in the moves it has made over the last year.

The Bucks posted the NBA’s best regular-season record last year but fired coach Mike Budenholzer after a stunning 4-1 first-round playoff loss to the Miami Heat. Budenholzer had led the 2020-21 Bucks to the franchise’s first championship in half a century.

Milwaukee followed that up by acquiring seven-time all-NBA guard Damian Lillard from the Portland Trail Blazers to team him up with two-time MVP Giannis Antetokounmpo, who signed a three-year, $186 million contract extension shortly before the season. The Bucks gave up two-time All-Star guard Jrue Holiday and Grayson Allen in the Lillard trade, which also left them without control over any of their first-round draft picks until 2031.

Now they’ve fired Griffin after just 43 games.

Rivers’ immediate task at Milwaukee would be to upgrade a defense that performed poorly enough under Griffin to cast doubt on the Bucks’ chances of seriously contending for a title. The Bucks rank 21st in defensive rating, down from fourth last season.

Although the Bucks have one of the league’s best records, they face a much tougher schedule the rest of the way. They’ve produced some troublesome performances while going 6-5 in January, though they’ve won five of their last six games.

They lost back-to-back games against the Indiana Pacers, who own a 4-1 record against Milwaukee this season. They trailed by 31 points at halftime of a 132-116 home loss to Utah in which Lillard was unavailable. They needed a Lillard 3-pointer at the buzzer to beat Sacramento at home in overtime and suffered a 40-point loss at Cleveland last week when Antetokounmpo was out with a bruised right shoulder.