After spending 35 days in jail for contempt of court, Gaithersburg inventor Robert W. Kearns has agreed to settle a protracted divorce suit that will require him to vacate his home and contribute 10 percent of his royalties from patent infringement cases.

Kearns, who is suing car makers for allegedly pirating his patent for intermittent windshield wipers, was held in contempt July 20 by Montgomery County Circuit Judge J. James McKenna for failing to comply with a 1989 divorce order.

McKenna sentenced Kearns to 120 days in the Rockville county jail. Under the judge's order, Kearns, 63, could be set free at any time once he agreed, among other things, to pay back alimony, to move out of the couple's former home and to set up "some sort of mechanism" for his former wife, Phyllis Kearns, to receive 10 percent of the proceeds from the patent litigation.

Kearns capitulated at 6 p.m. Thursday, according to court documents filed yesterday. Fifteen minutes after signing the legal papers, Kearns was released from jail.

"We're very relieved it's over," said Madalyn E. Johns, Phyllis Kearns's attorney. "It has been an extremely emotional matter for everyone."

Neither Kearns or his attorney, William Durkee, was available for comment yesterday.

According to court records, Kearns has agreed to turn over $350 of his monthly federal disability check to his ex-wife for alimony payments. In addition, Kearns agreed to pay off all liens on the couple's house on Lookout Place so the property can be sold.

As part of the final agreement, Kearns said he would dismiss all appeals of the 1989 divorce order. In addition, Kearns agreed to pay about $1.5 million in attorney and court fees from his first patent award, court records said.

Kearns was awarded $5.2 million by a federal jury July 13 in a lawsuit against Ford Motor Co. Kearns, who was once offered $30 million to settle the Ford suit, has similar patent infringement cases pending against 30 other car makers.

Under the final agreement, Kearns agreed to set up a bank account in Detroit for royalties from the patent litigation. The 10 percent share for his ex-wife will be drawn from this account, with any disputes to be settled through arbitration, court records show.