Rich Pedroncelli/Associated Press California Supreme Court Chief Justice Tani Cantil-Sakauye said she had been considering leaving the Republican Party for some time.

The chief justice of California’s Supreme Court has quit the Republican Party following misgivings about the controversial hearings involving then-Supreme Court nominee Brett Kavanaugh — as well as growing concerns about the general direction of the GOP, she said.

“I’ve been thinking about it for some time,” Tani Cantil-Sakauye, 59, told CALmatters in an interview published Thursday. She said her husband and friends told her: “You didn’t leave the party. The party left you.”

Cantil-Sakauye, who had been a lifelong Republican and was appointed by former GOP Gov. Arnold Schwarzenegger, said she made her final decision to leave her party after watching the Kavanaugh confirmation hearing, when a California professor testified that he had sexually assaulted her in high school.

“I felt compelled to make a choice now,” said Cantil-Sakauye, who is only the second woman to serve as California’s chief justice and the first Filipina-American on the court. “It better suits what I do and how I approach issues.”

Her decision underscores the GOP’s sinking popularity with women — and with the people of California. Less than a quarter of voters in the state are registered as Republicans. California Republican Party Chairman Jim Brulte said his state party is the “canary in the coal mine” for the national GOP. “Don’t think California’s just a bunch of crazy whackos,” he said. “We’re the leading edge of demographic change.”

Cantil-Sakauye, the daughter of farmworkers, clashed with officials of her now-former party early last year with a harsh letter to John Kelly, who was then secretary of homeland security, and then-Attorney General Jeff Sessions, ordering them to stop Immigration and Customs Enforcement from “stalking” immigrants in courthouses.

“Enforcement policies that include stalking courthouses and arresting undocumented immigrants, the vast majority of whom pose no risk to public safety, are neither safe nor fair,” she wrote. “They not only compromise our core value of fairness but they undermine the judiciary’s ability to provide equal access to justice.”

Cantil-Sakuaye earlier in the week in her annual address to reporters talked of a generation of judges who embrace what she classified as California values and who care about homelessness, climate change and “what are we going to do about guns.”

Cantil-Sakauye has re-registered as a “no-party-preference” voter. Such voters in the state now outnumber California Republicans, according to CALmatters.