UNDATED (AP) — 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 ping-pong 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 both went to the Los Angeles Clippers and No. 14 Denver.

The draft will be held on June 21.