We're told Shelly sees the handwriting on the wall -- the NBA wants the team sold -- but she wants to do it on her terms. She and her lawyer, Pierce O'Donnell, have been secretly meeting with NBA Commissioner Adam Silver to see if they can reach an agreement whereby Shelly has the right to voluntarily sell the team.

Shelly is taking matters into her own hands. Ballmer -- worth an estimated $20 billion -- has indicated he wants to buy the team. We're told O'Donnell will be present at the meeting.

Here's the rub for L.A. fans. Although Ballmer has publicly said if he bought the team he would keep it in the City of Angels ... he's deeply entrenched in Seattle. He was actively trying to keep the Sonics in his home city before the team moved to Oklahoma. With such deep family ties and city pride ... there's fear Ballmer would move the team North.