The City Council of Sacramento approved a plan to help finance an estimated $391 million arena that will be built downtown to keep the Kings.
"Long live Sacramento, and long live the Kings!" shouted Sacramento Mayor and former NBA All-Star Kevin Johnson.
Under the agreement, the city will contribute $255.5 million to the project, mostly by leasing out parking garages around the facility.
The Kings have agreed to pay $73.25 million and arena operator AEG will contribute $58.75 million.
"I want to thank you on behalf of my family and our organization for taking the next step forward," Kings co-owner Gavin Maloof told the council. "We look forward in working with you throughout this process and we are excited about this. We appreciate your efforts. This is a great day for Sacramento."
The Kings were likely to move to Anaheim if a new arena deal couldn't be reached.