BOSTON -- Massachusetts will become the first state to require insurance companies to pay for all medical treatment of infertility under a new law.

The law, signed Thursday by Gov. Michael Dukakis, goes into effect Jan. 6. It is expected to help hundreds of couples who have been unable to afford infertility treatments, including expensive in vitro fertilization.

In 1985, Maryland passed the first, and to date only, law on infertility coverage, but it applied only to a limited procedure. The Massachusetts law covers all aspects of diagnosis and treatment of infertility.

"Insurance companies have tended to regard infertility as a cosmetic problem, like a nose job," said Karen Sweet, a lobbyist for Resolve of the Bay State, a group that offers support and counseling to infertile people.

"In practice, most people were getting most things paid for," she said. "But the coverage was inconsistent and inequitable in many cases. Usually, if a doctor used a medical term to describe it, it got covered."

Many couples in Massachusetts have found that initial treatments for infertility were covered by insurance, but subsequent ones were not, according to Resolve.

In vitro procedures -- in which a woman's eggs are removed, fertilized in a glass and then implanted in her uterus -- cost about $5,000 per attempt and often require several tries. Such procedures are considered a last-resort treatment of infertility.

The bill passed easily despite opposition from Blue Cross and Blue Shield of Massachusetts and the Roman Catholic Church.

The insurance industry claimed the bill would cost $100 million a year, while proponents said it will cost insurance companies, and ultimately policyholders, about $5.5 million annually -- $2.3 million for so-called routine methods and $3.2 million for in vitro procedures.