Ostertag's contract expired in 2004, making him a free agent in the league. After nine seasons in Utah, he joined the Sacramento Kings. He played one year in Sacramento, before the Kings sent him back to Utah in a "mega-trade" that involved five teams and 13 players—the largest trade in NBA history. Ostertag played one final season (2005-06) with the Jazz, seeing limited action. He played his final game on April 19—a home contest against the Golden State Warriors. Having previously announced his retirement, and that game being the last of the season, Ostertag received a standing ovation from Jazz fans. He played 3:36 in the game, all in the first quarter. Fittingly, he blocked a shot and grabbed a rebound—and missed two free throws. The Jazz won the game, giving the team a final record of 41-41 for the year, ensuring that Ostertag retired having never played for a losing team for his entire NBA career.