The Roman Catholic Diocese of San Diego said Friday it has agreed to pay $198.1 million to settle 144 claims of sexual abuse by clergy, the second-largest payment by a diocese.

The agreement caps more than four years of negotiations in state and federal courts.

Earlier this year, the diocese abruptly filed for bankruptcy protection just hours before trial was scheduled to begin on 42 lawsuits alleging sexual abuse. Bankruptcy could shield the diocese's assets, but a judge recently threatened to throw out the bankruptcy case if church officials didn't reach an agreement with the plaintiffs.

The San Diego diocese initially offered about $95 million to settle the claims. The victims were seeking about $200 million.

"The diocese has always been committed to resolving this litigation in a way that fairly compensates these victims of abuse and would still preserve the ongoing ministries and programs of the church," Bishop Robert Brom said in a press release Friday.

"We pray that this settlement will bring some closure and healing to the years of suffering experienced by these victims."

In the largest payment yet in the scandal, the Los Angeles Archdiocese settled 508 cases for $660 million in July, two days before jury selection was scheduled to begin in the first of 15 trials involving 172 abuse claimants there.

The Diocese of Orange agreed in 2004 to settle 90 claims for $100 million after a judge promised to set trial dates and begin the discovery process if settlement talks collapsed. Bishop Tod D. Brown later said he couldn't risk a trial in a state where a jury once awarded $30 million to two people who claimed they were sexually abused by clergy.

The Diocese of San Diego, with nearly 1 million Catholics and holdings throughout San Diego County, is by far the largest and wealthiest of the five U.S. dioceses to have filed for Chapter 11 bankruptcy protection under the shadow of civil claims over sexual abuse.

Dioceses in Spokane, Wash., Portland, Ore., and Tucson, Ariz., have already emerged from Chapter 11 bankruptcy protection. The Davenport, Iowa, diocese, which faces claims from more than 150 people, is still in proceedings.