Mike Brown and the Cleveland Cavaliers are getting back together

It was three summers ago that the Cleveland Cavaliers fired coach Mike Brown in a last-ditch effort to persuade LeBron James to stay.

Brown, who coached the Cavs to the playoffs in each of the five seasons he coached them, from 2005 to 2010, has agreed to a five-year, $20 million deal. The Cavs have a team option for the fifth year, which is partially guaranteed for Brown.

Brown will return to the job the Cavs fired him from in 2010 despite back-to-back 60-win seasons. He was the Cavs’ top choice for the job and the only person they interviewed, though they did reach out to former Lakers and Bulls coach Phil Jackson to gauge if he had any interest.

Brown met with Cavs owner Dan Gilbert and general manager Chris Grant this past weekend in Detroit.

A major factor in Brown’s decision to accept the job is his family, which had planned to move back to Cleveland this summer after he was fired as coach of the Lakers early this season. Brown also has a strong and longstanding relationship with Grant.

The Cavs wanted to move fast to secure Brown. Sources told ESPN.com that Brown already had turned down the Phoenix Suns’ coaching position and could have become a candidate for other jobs in the coming days.

Sources say Brown views the Cavs’ position as one of the top jobs available because of the presence of All-Star point guard Kyrie Irving and the club’s substantial amount of salary-cap space.

“I’m happy for him, very happy for him,” James said Tuesday before Game 2 of the Heat’s first-round series against Milwaukee. “I think he’s a really good coach, very defensive-minded coach. It’ll be good for the young guys that they have.”

Brown was fired by the Cavaliers after the 2009-10 season and hired by the Lakers before the 2011-12 season. In his first season, the Lakers went 41-25 and lost in the conference semifinals. He was fired five games into this season but had two years and $11 million left on his contract. The Lakers have been informed they would get some relief from the $6.5 million-$7 million they owe Brown over the next two years. It was unclear how much it would be, but it was not expected to the full amount.