NEWARK, FEB. 6 -- Surrogate mother Mary Beth Whitehead Gould and her former husband have settled a lawsuit charging a New York clinic that arranged the Baby M contract was not careful enough in selecting her, their lawyer said today.

The surrogate mother, who lost custody of her daughter last week after nearly two years of highly publicized court battles, will file the settlement this week in federal court in Manhattan, attorney Lou Rainone said.

The suit, filed in October 1986, accused the Infertility Center of New York and its director, Noel Keane of Dearborn, Mich., of negligence for failing to exercise proper care in choosing her to serve as a surrogate.

Lawyer Joel Siegal, who represented the surrogate mother and her ex-husband, Richard Whitehead of Brick Township, in the suit, said he would not reveal details of the settlement.

The New Jersey Supreme Court ruled Wednesday that the surrogate motherhood contract signed with a childless couple was invalid, overturning the decision of a lower court on the matter.

However, the high court refused to give the surrogate mother custody of the child, known in court papers as Baby M, who will remain with her natural father, William Stern, and his wife, Elizabeth, of Tenafly.

Siegal said the settlement of the infertility center lawsuit was reached with Keane's lawyer, Mark Morgenstern, before the state Supreme Court ruling and was unaffected by it.