Free agent Luol Deng has committed to signing with the Miami Heat, reaching agreement on a two-year, $20 million deal, league sources told RealGM.

Deng’s agreement with the Heat will include a player option for the second season, a source said.

After the departure of LeBron James, Pat Riley pushed hard over the weekend to sign Deng as his new starting small forward. One of the most versatile players on the free agency market, Deng brings the offensive and defensive credentials to help the Heat maintain a competitive threat in the Eastern Conference.

A two-time NBA All-Star, Deng played nine seasons for the Chicago Bulls and averaged 19 points and 6.9 rebounds in 23 games before his trade to the Cleveland Cavaliers in January. The 6-foot-9 forward had averages of 16 points and 5.7 rebounds with the Cavaliers.

Deng’s representatives worked on finalizing his contract during the weekend, but several teams – including the Atlanta Hawks and Phoenix Suns – had remained in conversations to sign him. The Los Angeles Clippers, Dallas Mavericks and Hawks inquired on Deng once free agency started on July 1, and the Heat sustained genuine interest.

Deng committed to the Heat’s offer on Sunday afternoon.

Deng, 29, has averaged 16 points and 6.3 rebounds in 10 NBA seasons. With the Bulls, Deng performed the best basketball of his career in a first-round upset over Miami in 2007, when he scored 26.3 points and grabbed nine rebounds in a sweep of Riley’s team. He had held a healthy rivalry against Miami, Riley and their roster.