THE CURIOUS case of Kathleen Kane took center stage in Philadelphia yesterday.

The state Supreme Court heard spirited arguments in a packed City Hall courtroom over whether a grand-jury investigation into Kane, the state's first female attorney general, had unfolded on sound legal ground.

If you're new to this mind-boggling story, it goes something like this:

* Last fall, Montgomery County Judge William Carpenter appointed a special prosecutor, Thomas Carluccio, to lead a grand-jury investigation into allegations that Kane's office had leaked information to the Daily News about a 2009 grand-jury investigation into former Philadelphia NAACP head J. Whyatt Mondesire.

* In January, word leaked to the Inquirer that the grand jury had recommended that Kane should face criminal charges, including perjury and contempt of court. The decision to prosecute was left in the hands of Montgomery County District Attorney Risa Vetri Ferman.

* A few weeks later, Kane obtained a Supreme Court order barring Ferman from making any decisions about the case until after the court ruled on a legal challenge from Kane.

Got it?

Kane's challenge boils down to whether Carpenter had the legal authority to appoint a special prosecutor to investigate the alleged leak of information about the Mondesire case - especially since Carpenter didn't oversee that case.

Kane's lawyer, Joseph Del Sole, a former Superior Court judge from Pittsburgh, argued that Carpenter had erred and should have simply referred the allegations to a county district attorney.

"Judge Carpenter overstepped his bounds," Del Sole said.

Kane, sitting in the last row of the gallery next to what appeared to be a group of visiting high school students, nodded silently.

Supreme Court Justice Michael Eakin said he wondered if a small-county district attorney would want to take on investigating the attorney general.

Carluccio, representing himself, argued that Carpenter had acted appropriately in appointing him to investigate the leak.

He described a grand jury judge as a "gatekeeper of secrecy" who is responsible for protecting the integrity of grand jury investigations, even if the judge wasn't involved with a particular case.

Carluccio said Kane objected to the process because she was unhappy with the outcome.

Chief Justice Thomas Saylor seemed to side with Carluccio, saying that he thought Carpenter had "a lot of authority" to appoint the special prosecutor.

It's unclear when the Supreme Court will make its ruling, which could decide the fate of Kane's career.

When the hearing ended, Kane faced a horde of reporters in a City Hall hallway while curious on-lookers craned their necks to get a glimpse of the spectacle.

"I will tell you that I'm very cautiously hopeful about today, and I'm very grateful that the court took the time to listen to this important case for me and for Pennsylvania," she said.

Carluccio darted down the same hallway, saying only that his "motivation was to find the truth."

On Twitter: @dgambacorta