Just a day after NBA owners officially rejected a bid to relocate the Sacramento Kings to Seattle, the team's owners have agreed to sell the Kings to a Sacramento-based group, sources told ESPN.com.

Software billionaire Vivek Ranadive will purchase 65 percent of the Kings from the Maloof family in a deal that is expected to be announced Friday. Jesse D. Garrabrant/Getty Images

Software billionaire Vivek Ranadive came to an agreement to purchase 65 percent of the Kings from the Maloof family for approximately $348 million, sources said. The Kings' total valuation in the sale is $535 million, an NBA record.

An official announcement is expected Friday.

The Maloofs, who have owned the team since 1998, had hoped to sell the stake to a group of Seattle businessmen that was offering $406 million for their shares. The family later proposed keeping controlling interest of the team but selling off a 20 percent stake to the Seattle group.

However, since the team will remain in California and the league's owners support Ranadive, the Maloofs quickly dropped their other plans and came to an agreement.

NBA commissioner David Stern said Wednesday he expected such a deal would be signed by the end of the week. Stern said Ranadive already had put more than $200 million in an escrow account in anticipation of the purchase.

The Sacramento Bee first reported the sides had reached a deal.

After $60 million of debt owed to the city of Sacramento plus money owed to the NBA, the Maloofs are expected to clear a little more than $200 million from the sale. When they bought the team, they paid the valuation of $156 million.