The Sacramento Kings have secured their spot in the NBA’s Western Conference play-in tournament.

The Kings clinched one of the last two play-in berths when the Phoenix Suns suffered a loss to the Golden State Warriors on Tuesday at PHX Arena in Phoenix, Arizona.

The Kings (39-40) were ninth in the West going into Wednesday’s game against the Denver Nuggets at Golden 1 Center in Sacramento. The Mavericks (38-41) were 10th, three games ahead of the Suns (35-44) with three games remaining.

The team that finishes ninth will play host to the No. 10 team in the first round of the play-in tournament on April 16. The winner of that game will hit the road to face the loser of the No. 7 vs. No. 8 game April 18 for the right to advance to the playoffs as the No. 8 seed in the West.

The Kings jeopardized their play-in chances while losing 11 of 14 games from March 9 -April 2. They solidified their position by winning the last three games on a six-game road trip.