NEW YORK (AP) _ A young lawyer at the center of an insider trading ring known as the ''Yuppie Five'' was sentenced Tuesday to four months in prison - nearly two years after he admitted his guilt.

Michael David pleaded guilty in November 1986 to four criminal counts for his part in an insider trading scheme with three other Wall Street professionals and an investor.

The five, who have all pleaded guilty to various charges, were all in their 20s at the time of the indictment and were dubbed the ''Yuppie Five.''

The case had nothing to do with insider trading cases involving Ivan F. Boesky and Dennis B. Levine, said officials.

David, 30, of Manhattan, the last to plead guilty after his pre-trial motions were denied by U.S. District Judge John Keenan in late 1986, pleaded guilty to conspiracy, securities fraud, mail fraud and obstruction of a Securities and Exchange Commission investigation.

''You completely disrupt the forces of the free market and help to create incredible cynicism among the general populace,'' Keenan lectured David, adding: ''People think that no one is straight.''

Defense lawyer Darrell Fennell, in asking for leniency, noted that David, once an associate at the the prominent New York law firm of Paul, Weiss, Rifkind, Wharton and Garrison, faces disbarment and has been driving a cab to support himself.

Visibly irritated, Keenan countered: ''I don't think anyone should confuse the practice of law with a right - it's a privilege 3/8''

''I regret my conduct,'' David, dressed in a dark gray suit, told Keenan before sentence was imposed and asked the judge for an opportunity ''to help rebuild my life as I have tried to do.''

''If I just say 'Go and sin no more,''' said Keenan, slapping his own wrist, ''I'm making a mockery of the process.''

Keenan added: ''You did betray a trust.''

He sentenced David to four months in prison and four years probation. Keenan did not impose a fine but David faces civil penalties of between $50,000 and $150,000 under an SEC consent agreement.

Assistant U.S. Attorney Carl H. Lowenson Jr., noted that David had cooperated extensively for almost two years with federal investigators and if there were any future trials arrising from the probe ''Mr. David would be an important government witness.''

Keenan said he would have sentenced David to more jail time if not for his cooperation.

David received the longest jail term of the ''Yuppie Five.'' Former stock broker Morton Shapiro was sentenced to two months in prison but the other three did not receive jail terms.