SAN FRANCISCO — A Superior Court judge ruled on Wednesday that Ellen Pao, the former venture capitalist at the center of the high-profile sex discrimination case earlier this year, must pay Kleiner Perkins Caufield & Byers nearly $276,000 to reimburse the venture capital firm for its expenses during the five-week trial.

The payout is roughly a fourth of the amount Kleiner Perkins had demanded — $972,814 — for reimbursement of its trial costs, the lion’s share of which went to fees and traveling expenses for expert witnesses. That figure doesn’t include fees for Kleiner’s legal team, led by Orrick attorney Lynne Hermle.

Judge Harold Kahn, who presided over the trial, said in a tentative ruling that Kleiner was entitled to just a portion of the reimbursement it demanded for expert witnesses — some of who charged thousands of dollars for a few hours of testimony. Kahn said he didn’t deem the expert witness costs unreasonable, but decided to scale them back, citing the vastly different resources available Kleiner Perkins, one of the wealthiest VC firms in the valley, and Pao, the interim CEO at microblogging site Reddit.

“There is no doubt that KPCB has vastly greater economic resources than Ms. Pao,” Kahn wrote. “Nor is there any doubt that Ms. Pao is not indigent. While… Ms. Pao has significant economic resources, it is also undoubtedly true that the $864,680.25 that KPCB seeks in expert fees is a material amount in the context of Ms. Pao’s resources.”

In March, a 12-member jury found in favor of Kleiner on each of Pao’s four claims of sex discrimination and retaliation during her seven years at the firm; she was fired in October 2012, five months after filing the lawsuit. She sued for $16 million, but walked away with nothing.

Pao had argued against Kleiner’s demand for reimbursement, saying she wasn’t responsible for the colossal sum Kleiner spent on expert witnesses.

Khan agreed, in part: “Although KPCB had the right to spend whatever it wished on experts,” Pao doesn’t necessarily have to pay the full bill, he ruled.

The majority of the amount Kahn ordered Pao pay — $228,646 — is meant to reimburse Kleiner for the expert witnesses costs.

Pao and Kleiner will meet in court Thursday for a hearing on the costs, and Kahn’s decision could change.

Kleiner had argued that it has a right to collect reimbursement from Pao because it won the gender-bias case on all counts, and because Kleiner offered Pao a settlement of nearly $1 million in 2014, about three months before the trial started, which she turned down.

Kahn said in his decision that Kleiner’s settlement offer to Pao was made in “good faith” and Pao could have accepted it, even if the amount was a fraction of the total legal costs she had incurred at the time.

Kleiner offered to waive all of its trial fees if Pao agreed to drop an appeal. She rejected that offer, and earlier this month filed a notice to appeal the jury’s decision; she has until mid-July to file her argument with an appeals court. Pao, however, has agreed to drop her appeal if Kleiner will pay her $2.7 million so she can recover her own costs from the three-year legal battle. Kleiner has said it won’t pay Pao a dime.

Contact Heather Somerville at 510-208-6413. Follow her at Twitter.com/heathersomervil