Three years after tottering back from the brink of bankruptcy, Chrysler Corp. yesterday repaid the last $813.5 million of its federally guaranteed loans--with interest and seven years ahead of schedule.

"I was relieved to get the money in 1980, but I'm ecstatic to get out of hock," said Chrysler Chairman Lee Iacocca, handing over the check to United States Trust Co., a New York bank.

Chrysler, on its way to record earnings this year, announced its plans to repay the loans last month. The company lost $3.27 billion between 1979 and 1981 and borrowed $1.2 billion in 1980 and 1981.

The company repaid $400 million of the loans on June 15 after posting a record first quarter profit of $172.1 million. Company officials estimate that with this final repayment Chrysler will save roughly $329 million in interest costs that would have fallen due over the next seven years.

While Chrysler was paying off its debt, Secretary of the Treasury Donald. T. Regan and Asst. Secretary of Domestic Finance David Healy recused themselves from participating in the government's plan to sell warrants it holds to buy Chrysler stock. The government currently has 14.4 million warrants of Chrysler stock.

Regan was formerly chairman of Merrill Lynch & Co. Healy recently came to Treasury from Dean Witter Reynolds Organization Inc. Both brokerage houses are likely to bid for the warrants. "The Secretary and Mr. Healy didn't want there to be a shadow of doubt of propriety," said a Treasury spokesperson.

Chrysler had strenuously but unsuccessfully fought the sale, arguing that it would undercut the price of their stock. This week the treasury rejected Chrysler's request to buy back the warrants and said it would sell them to the highest bidder.

A warrant gives its owner the right to buy stock at a set price at some time in the future. The Chrysler warrants permit the purchase of the company's stock for $13 a share anytime until 1990. Chrysler stock closed Thursday at $25.75 a share.

The Treasury spokesman said the government would announce its procedure to sell its warrants within the next two weeks. At least one Wall Street firm has already submitted a bid to handle the sale as underwriter, buying the warrants from the government and reselling them.