Chicago: Phoenix has won the No. 1 pick in next month’s NBA draft.

It’s the first time the Suns will have the chance to make the first overall selection. The Suns had the right combination of pingpong balls pop up for them at the draft lottery on Tuesday night, a reward of sorts after a season where Phoenix had the NBA’s worst record at 21-61.

Phoenix lost a coin flip for the top pick in 1969 to Milwaukee. The Bucks took Kareem Abdul-Jabbar. The Suns took Neal Walk.

Sacramento will pick No. 2 and Atlanta got the No. 3 pick — both of them moving up to get there. The top three spots were determined by the lottery, and then spots 4-14 fell in line of reverse order of record.

The rest of the slots, in order, went to No. 4 Memphis, No. 5 Dallas, No. 6 Orlando, No. 7 Chicago, No. 8 Cleveland, No. 9 New York, No. 10 Philadelphia, No. 11 Charlotte, No. 12 and No. 13 Los Angeles Clippers, and No. 14 Denver.

The draft is June 21 at Barclays Center in Brooklyn.