Baron Davis averaged 16.5 points and 7.3 assists per game during his 12-year career.(Tony Dejak/AP Photo)

Davis was informed of the trade after the Clippers’ loss in New Orleans. “He was stunned,” said a source close to him.

Davis, 31, has two years and $29 million left on his contract after this season. He signed a five-year, $65 million contract with the Clippers in July 2008, intending to return to his hometown to play alongside Elton Brand.

Brand, however, passed on a chance to re-sign with the Clippers and instead joined the Philadelphia 76ers. Neither Davis nor the Clippers met expectations as Davis struggled for much of his first two seasons in Los Angeles. Clippers owner Donald Sterling even began heckling Davis early this season.

The first-round pick the Clippers send the Cavaliers will end up being a lottery selection, but this year’s draft isn’t considered strong. The Clippers also already have six players age 22 and younger on their roster.

The trade also reunites Davis with Cavs coach Byron Scott. Scott coached Davis in New Orleans during the 2004-05 season, but the two often feuded, and Davis was eventually traded to the Golden State Warriors.

Williams, 28, has two years and $17 million left on his contract after this season. He came to the Cavaliers before the 2008-09 season as one of the top members of LeBron James’ supporting cast. Williams became an All-Star in 2009, and the Cavs finished with the league’s best record in his two seasons with James, but didn’t reach the NBA Finals.

After James joined the Miami Heat last summer, Williams said he briefly considered retiring. He is averaging 13.3 points and 7.1 assists this season but has played in only 36 games because of injuries.

The high draft pick the Cavs receive could help as they undertake a massive rebuilding project in the wake of James’ departure.