Josh Richardson — the 40th overall pick in the 2015 NBA Draft — has agreed to terms on a three-year, $2.5 million contract with the Miami Heat, league sources told RealGM.

Richardson’s deal is fully guaranteed for the first season and partially guaranteed the second year, sources said.

Out of the University of Tennessee, Richardson went from uninvited to the Draft Combine and left off mock drafts to selected and a guaranteed NBA contract. The 6-foot-6 guard rose on draft boards of NBA organizations during the pre-draft process with strong workouts and disposition, flying for workouts from his home in Oklahoma City.

Richardson averaged 11.8 points, 2.8 rebounds, 1.7 steals and 1.6 assists in 10 summer league games in Las Vegas and Orlando — performing between both guard positions.

The Heat envision Richardson, 21, to have an immediate impact on the defensive end and transition into a backcourt role.

As a senior at Tennessee, Richardson had averages of 16 points, 4.5 rebounds and 3.6 assists per game.