DENVER (AP) _ The nation's largest organization of lawyers went on record Monday in favor of legislation to bar discrimination against homosexuals.

The American Bar Association, which twice before rejected similar proposals, endorsed a resolution supporting federal, state and local legislation ''prohibiting discrimination on the basis of sexual orientation in employment, housing and public accommodations.''

The ABA's House of Delegates, the policy-making body for the 350,000-member lawyers' organization, voted 251-121 to adopt the resolution.

Members said the action will have important symbolic and practical impact in influencing lawmakers to adopt gay-right measures.

The House of Delegates also approved, by voice vote, a proposal calling for increased federal regulation of the insurance industry.

The proposal urges passage of federal legislation repealing the antitrust exemption the insurance industry was granted by Congress in 1945.

The ABA resolution is a response to the so-called liability crisis in which lawyers and insurance companies have blamed each other for the skyrocketing costs of liability insurance.

Proponents of the gay-rights resolution noted that many states and cities already have legislation to protect the rights of homosexuals.

Many states and cities already have legislation to protect the rights of homosexuals.

Laws banning discrimination in public employment based on sexual orientation have been adopted by California, Illinois, Maryland, Michigan, Minnesota, New Mexico, New York, Ohio, Oregon, Pennsylvania, Rhode Island and Washington state. Many cities have enacted more sweeping protection.

In a debate that was at times emotional, proponents of the gay-rights measure said the ABA is behind the times in speaking out in behalf of homosexual rights.

''It's a question of basic human rights,'' said Alexander Forger, a lawyer from New York City. ''What we do here today is simply make a statement in favor of decency and human rights, a compassionate voice for social justice.''

But opponents of the resolution said the ABA is taking sides with ''perversion'' and the corruption of children.

The ABA is ''encouraging a federal statute that will invade the rights of every American,'' said Augustine Smythe of Charleston, S.C.

''We shouldn't ram it down people's throats with a federal statute,'' he said.

Joe Stamper of Antlers, Okla., said the resolution endorses homosexual conduct. ''A majority of Americans looks with distaste on perversity that violates our religious precepts,'' he said.

The ABA's House of Delegates rejected a similar proposal by nine votes in 1985 and by 24 votes in 1983. In 1987, the group approved a resolution condemning crimes of violence based on prejudice against the victim's race, religion, sexual orientation or minority status. Supporters of the gay-rights proposal emphasized that homosexuality is not a matter of choice for most.

They also said there is no scientific evidence to show homosexuals are more likely than heterosexuals to molest children.

Alice Richmond of Boston said, ''It's important to me to separate out conduct that would be offensive, whether by heterosexuals or homosexuals.'' She said that when she was in the sixth grade she succeeded in getting a male teacher fired for making sexual advances to her. Endorsing equal treatment for homosexuals does not mean condoning conduct that would be offensive or illegal, she said.

Earlier Monday, Chief Justice William H. Rehnquist called for measures to limit the time in which death row inmates may challenge in federal court their convictions and death sentences.

Rehnquist said such a limit should be combined with expanded legal help for those accused of capital crimes to ensure that constitutional challenges to death penalty sentences are handled more efficiently.