SAN DIEGO — Conan O’Brien has agreed to settle a lawsuit with a writer who says the talk-show host stole jokes from his Twitter feed and blog for monologues on “Conan.”

Attorneys for O’Brien and writer Robert Kaseberg filed documents Thursday in federal court in San Diego disclosing the agreement. Terms were not disclosed.

The deal came nearly four years after the rare joke-theft case began and about three weeks before a trial was set to start.

O’Brien wrote a column in Variety explaining the settlement, insisting neither he nor any staffers had heard of Kaseberg at the time, and no one stole any jokes.

O’Brien said he didn’t want a “farcical and expensive” trial.

Kaseberg said in a statement that he’s proud he shed light on joke theft and is happy the resolution was amicable.

Only subscribers are eligible to post comments. Please subscribe or to participate in the conversation. Here’s why.

Use the form below to reset your password. When you've submitted your account email, we will send an email with a reset code.