Samuel R. "Sandy" Berger, President Clinton's national security adviser, agreed yesterday to pay $23,043 for failing to sell Amoco Corp. stock for 15 months after government attorneys advised him to do so.

In papers settling a civil conflict-of-interest suit brought against him by the Justice Department, Berger said he forgot about the instructions to sell the 1,300 Amoco shares, held in four trusts for his wife and three children, and thus did not knowingly take part in decisions in which he had a financial interest.

As part of the settlement, Berger acknowledged matters that may have affected Amoco came before him during the 15-month period -- from March 16, 1994, until June 19, 1995 -- when he was deputy national security adviser.

But there is no evidence that Berger considered any effect his actions would have had on his family's financial interest.

Justice Department attorneys said that lacking evidence of Berger's intent to violate the conflict-of-interest law, they would not bring criminal charges against him.

"I should have sold the stock in 1994 when I was first told to do so," Berger said in a statement. "I forgot to do this until I was reminded in June 1995. This was a mistake." He said he was paying all the earnings from the stock "to avoid even the appearance of having profited in any way from this oversight."

The settlement payment, to be made in 10 days to the U.S. treasurer, represents the $19,338 increase in the value of the Amoco shares over the 15 months that Berger failed to sell them and $3,705 in dividends paid on the stock.

The resolution of the Berger case was similar to that of two other recent cases, including a belated stock sale by Berger's predecessor and former boss, Anthony Lake.

Lake agreed in February to pay a $5,000 civil settlement for failing to sell four energy stocks for more than two years after being advised to divest by the White House counsel's office in 1993.

Last month, Postmaster General Marvin Runyon paid a $27,550 civil settlement of allegations he discussed putting Coca-Cola machines in the nation's 40,000 post offices while owning stock in the company. The deal was never completed.

"The president was satisfied long ago with how this issue was resolved and he has complete confidence in Sandy," White House spokesman Barry Toiv said.