California Code of Civil Procedure section 998 encourages parties involved in legal disputes to settle prior to trial. According to this law, either party can present a written settlement offer to the other party up to ten days before the trial begins. (CCP § 998(b).)
If the plaintiff declines a timely offer from the defendant and subsequently receives a judgment at trial that isn’t more favorable than the defendant’s offer, the plaintiff must “pay the defendant’s costs from the time of the offer.” (CCP § 998(c)(1).) Moreover, in many civil cases, the court may also require the plaintiff to pay a reasonable amount of the defendant’s expert witness expenses incurred after the offer was presented.
Likewise, if the defendant rejects the plaintiff’s timely offer and later gets a judgment at trial that isn’t more advantageous than what the plaintiff offered, the court has the authority to require the defendant to pay the plaintiff a reasonable portion of their costs related to expert witnesses incurred after the offer was made. (CCP § 998(d).)