The Pistons won the NBA draft lottery on Tuesday night, meaning they’ll have the No. 1 pick on July 29 — and, presumably, the chance to take Oklahoma State guard Cade Cunningham.

Houston — which basically had 50-50 odds of picking in the top four — got the No. 2 pick. Cleveland will pick No. 3 and Toronto will pick No. 4, after both of those franchises got some lottery luck to move up in the order.

The lottery — 14 ping-pong balls, all numbered 1 through 14, placed into a hopper — technically only determines the first four picks. The rest then default to a pre-established order of finish; Golden State, for example, had only a 2.4% chance of its own pick being anything other than the No. 14 selection.

The Atlanta Hawks hold the No. 20 spot in the first round by virtue of losing tie breaker to the N.Y. Knicks, who will have pick at 19.

Atlanta also holds the 48th overall pick (No. 18, second round), which it received from Miami via Sacramento in the 2020 trade that sent Jabari Parker and Alex Len to the Kings in exchange for center Dewayne Dedmon and a pair of second-round picks. The Hawks traded away their original second-round pick (and Taurean Prince) to Brooklyn in a 2019 deal for Allen Crabbe. The Nets will make that selection immediately after the Hawks in the second round.

The draft will take place Thursday, July 29 (8 p.m., ABC and ESPN). The NBA has not detailed where the event will take place. Last year it was held virtually from the ESPN studios in Bristol, Conn.

2021 NBA draft order

FIRST ROUND

  1. Detroit Pistons
  2. Houston Rockets
  3. Cleveland Cavaliers
  4. Toronto Raptors
  5. Orlando Magic
  6. Oklahoma City Thunder
  7. Golden State Warriors (from Minnesota)
  8. Orlando Magic (from Chicago)
  9. Sacramento Kings
  10. New Orleans Pelicans
  11. Charlotte Hornets
  12. San Antonio Spurs
  13. Indiana Pacers
  14. Golden State Warriors
  15. Washington Wizards
  16. Oklahoma City Thunder (from Boston)
  17. Memphis Grizzlies
  18. Oklahoma City Thunder (from Miami)
  19. New York Knicks
  20. Atlanta Hawks
  21. New York Knicks (from Dallas)
  22. Los Angeles Lakers
  23. Houston Rockets (from Portland)
  24. Houston Rockets (from Milwaukee)
  25. L.A. Clippers
  26. Denver Nuggets
  27. Brooklyn Nets
  28. Philadelphia 76ers
  29. Phoenix Suns
  30. Utah Jazz

SECOND ROUND

  1. Milwaukee Bucks (from Houston)
  2. New York Knicks (from Detroit)
  3. Orlando Magic
  4. Oklahoma City Thunder
  5. New Orleans Pelicans (from Cleveland)
  6. Oklahoma City Thunder (from Minnesota)
  7. Detroit Pistons (from Toronto)
  8. Chicago Bulls (from New Orleans)
  9. Sacramento Kings
  10. New Orleans Pelicans (from Chicago)
  11. San Antonio Spurs
  12. Detroit Pistons (from Charlotte)
  13. New Orleans Pelicans (from Washington)
  14. Brooklyn Nets (from Indiana)
  15. Boston Celtics
  16. Toronto Raptors (from Memphis)
  17. Toronto Raptors (from Golden State)
  18. Atlanta Hawks (from Miami)
  19. Brooklyn Nets (from Atlanta)
  20. Philadelphia 76ers (from New York)
  21. Memphis Grizzlies (from Portland)
  22. Detroit Pistons (from L.A. Lakers)
  23. New Orleans Pelicans (from Dallas)
  24. Indiana Pacers (from Milwaukee)
  25. Oklahoma City Thunder (from Denver)
  26. Charlotte Hornets (from L.A. Clippers)
  27. Charlotte Hornets (from Brooklyn)
  28. New York Knicks (from Philadelphia)
  29. Brooklyn Nets (from Phoenix)
  30. Indiana Pacers (from Utah)