Berryhill sought to force Columbia attorney Heidi Fuller to pay the legal fees he's racked up fighting a lawsuit she filed that argues he has not lived in the 14th Senate District long enough to represent it.
They're competing for the Republican nomination to succeed Sen. Dave Cogdill of Modesto.
Berryhill has contended that Fuller's case was frivolous, and he filed a "strategic lawsuit against public participation," or SLAPP, against her, which would have forced her to pay Berryhill's legal bills.
A Sacramento County Superior Court judge on Friday rejected Berryhill's request, a decision that Fuller characterized as demonstrating that her claim has merit.
Sign Up and Save
Get six months of free digital access to the Merced Sun-Star
Fuller lost her initial lawsuit earlier this month. It centered on a clause in the state constitution that requires candidates to live in a district for a year before running for office.
Berryhill moved from Modesto to Oakdale in January to run for the seat, which would give him 11 months in the district before Election Day.
The secretary of state has not enforced that residency requirement for more than 20 years, citing legal opinions that it would be unconstitutional to uphold it.
A judge at the Sacramento court two weeks ago rejected Fuller's case. She plans to appeal the ruling this week.
"We lost the battle but we won the war," Berryhill campaign consultant Steve Presson said about the SLAPP decision. "She has not been successful, nor will she be, in keeping Berryhill off the ballot."
The timeline of Fuller's appeal likely will run up close to the June 8 primary. Fuller said she's not going to drop the case until a court considers the residency requirement in the constitution.
"I'm going to continue it because I honestly think it's a question that has to be decided by the courts, and it's completely separate from my candidacy," she said.
Berryhill's move to the 14th Senate District followed Cogdill's November decision not to seek re-election.