For Bethesda urologist Robert Sher, it was the stock-market tip of a lifetime.

From a lifelong friend he learned that BDM International Inc. of McLean was a takeover target, soon to be sold for $29.50 a share.

With BDM stock in the low twenties in November 1997, Sher not only bought some but also told his family and friends so that they could get in on the buyout.

Sher and half a dozen relatives and fellow doctors made more than $300,000 when BDM agreed to be acquired by TRW Inc. a short time later. But this week they had to give it all back.

Facing an insider-trading lawsuit by the Securities and Exchange Commission, Sher agreed to turn over to the SEC not only the $103,000 profit he personally made on BDM stock but also the $203,000 made by his friends, plus a fine equal to all those profits.

With interest, "the tip of a lifetime" cost Sher $647,000, the SEC reported.

For Sher and his friends, the case was a costly lesson in how the insider-trading laws work. "Insiders," under the securities law, are individuals in positions of trust who are privy to important corporate information unavailable to the public.

Insiders act illegally if they trade on that information before it becomes public. If insiders pass on tips, the recipients of those tips also may run afoul of the insider-trading law--if it is proven that they knew the tip was inside information.

According to the SEC, Sher got his tip came from Lawrence Rosenfeld, 49, president of Stackig Advertising and Public Relations-TMP Worldwide of McLean, which was hired by BDM to help prepare a plan for marketing the company to prospective buyers.

When Rosenfeld told Sher, Sher became an insider.

Though Sher took responsibility for paying the full amount of the SEC penalty, other people he tipped off to the BDM takeover helped foot the bill, said his attorney, David J. Bartone. "There was a settlement pool that was formed in which people down the line who acted on his tip made contributions toward the settlement," Bartone said.

The others who bought BDM stock based on Sher's tip were not charged in the government's lawsuit because SEC investigators could not prove they knew they were trading on illegal inside information, the agency said.

People who acted on his stock tip had to repay their profits plus an equal penalty even though they didn't necessarily know they were breaking the law. The person who gave Sher the tip--Rosenfeld--also was penalized by the SEC even even though he never bought any BDM stock.

Rosenfeld attributed the whole incident to "an unfortunate and mistaken series of communications."

Rosenfeld said he "did not trade and did not profit" from trading BDM stock but found he was legally liable for the illegal profits made by Sher and another friend who did buy the stock.

To settle the SEC's civil lawsuit, he agreed to pay a penalty of $111,000--equivalent to the profits made by Sher and the other person he allegedly tipped off--Jennifer Weiss, 35, an advertising sales executive for Government Computer News, a Silver Spring magazine owned by The Washington Post Co.

Weiss, who made about $8,500 trading BDM stock, settled with the SEC on the same terms as Sher.

Rosenfeld said Sher, "my best friend for 35 years," happened to see a document describing the BDM buyout when he was visiting Rosenfeld's home office. Rosenfeld said he confirmed the pending takeover for Sher and only later was told the information about the deal was confidential.