The Catholic Archdiocese of Boston reached a settlement yesterday in the case of a priest who fathered two children with one of his parishioners, a Needham woman, and then fled her home the night she died of a drug overdose.

Church officials announced an agreement with the family of Rita Perry, who died in 1973, in the case against the Rev. James Foley. The priest acknowledged having a lengthy affair with Perry, and paternity tests eventually proved he was the father of two of her four children, Emily and James Perry.

The archdiocese issued a strongly worded statement in which Archbishop Sean P. O'Malley condemned sexual relationships between priests and parishioners.

"Archbishop O'Malley sincerely regrets that a sexual relationship existed between a priest of the Archdiocese and Rita Perry, as well as the involvement of Father Foley in the tragic circumstances of her death," the written statement said. "This tragic situation illustrates the inherently exploitive and harmful nature of sexual relationships between priests and parishioners."

Financial details of the settlement were not disclosed, but the agreement calls for Cardinal Bernard F. Law to meet privately with Perry's four children. Foley's church personnel file showed that in 1993 he admitted to Law and other church officials that he had an affair with Perry in the 1960s and 1970s and had been with her the night she overdosed. Foley was removed from ministry in December 2002, and Law resigned a week later.

The family had filed a wrongful-death suit against Foley, though not against the church. Roderick MacLeish Jr., the family's lawyer, called the settlement a "pastoral response" and said the family would drop the lawsuit.

In a written statement, the Perry family praised O'Malley's strong condemnation of Foley's actions. It was the first time the archdiocese "has acknowledged the destructive nature of priests preying on vulnerable women parishioners," the statement said.

O'Malley has met with the family "to express his apology directly to them and to express his further regret with regard to all that the Perrys have suffered since the revelation of these tragic events last year," according to the church's statement. It also noted that the archdiocese "has issued a Code of Ministerial Behavior which prohibits such relationships in the strongest possible language."

Under the settlement, James Perry will serve on a planned archdiocese advisory board, which will reach out to victims of clergy sexual abuse. "There is no closure to the wounds that have been caused and we intend to do everything we can in the future to ensure that these types of relationships never occur within the Church again and are never ignored by Church officials," read the family's statement.

For three decades, the Perry children thought their mother died alone of a drug overdose in 1973 as then 3-year-old Emily was asleep upstairs. They were also unaware that their mother had a relationship with Foley. She had originally sought counseling from the priest in the late 1950s and met up with him again following her lobotomy in the 1960s.

But in December 2002, the family had a startling revelation when James Perry saw a story on television about a priest who had an affair with a Needham woman who died in 1973.

Eventually, they obtained church records that showed Foley disclosed the affair and the fatal overdose in 1993 to Law and the Rev. John B. McCormack, now the New Hampshire bishop. But Law never told the Perry family. Instead, church leaders sent Foley for counseling. Law returned him to ministry in 1995, and he was removed in 2002.

In January 2003, Foley met with Perry's children and, according to them, described his version of what happened the night their mother died. Foley told them Rita Perry, who was 41, invited him to spend the night. Only Emily, who was 3, was home, and she was asleep upstairs. After midnight, Foley told them, Rita Perry became hysterical and questioned his love for her after he refused to spend the next day with her.

Minutes later, she emerged from the bathroom with a bottle of pills and asked Foley to help her get the top off. Foley said he took the bottle away from her and threw it under a sofa. He said that when she became sick shortly after that, and fainted, he realized that she had taken some pills while she was in the bathroom.

Foley acknowledged that he panicked after Rita collapsed and that he was unable to revive her. He fled after making an anonymous call to Needham police.

In a telephone interview yesterday, James Perry said the revelations have made the past year extremely painful for the family.

"It's been so tumultuous," he said. "It has deeply affected all of us. It's been an ongoing process of discovery of a lot of horrible information."

Material from Associated Press was used in this report.

For complete coverage of the priest abuse scandal, go to http://www.boston.com/globe/abuse