WASHINGTON - The government now has an equity stake in auto lender GMAC Financial Services after providing $12.5 billion in aid to keep loans flowing to buyers of GM and Chrysler cars, the Treasury Department said yesterday.

The Treasury holds a 35.4 percent stake in GMAC, after exchanging an $884 million loan it made to GM for that equity under an earlier agreement.

General Motors Corp. filed for Chapter 11 bankruptcy protection Monday, a move designed to remake the automaker as a leaner firm. The federal government is GM's principal owner, with a 60 percent stake.

The government has a vested interest in the success of GMAC, Chrysler, and GM in order to recoup the billions in aid it has doled out to the companies. Analysts have suggested that the federal support for GMAC will help make it a lending powerhouse that will give GM and Chrysler a big advantage over their competitors.

Detroit-based GMAC, with local operations in Fort Washington and Horsham, Pa., would be able to offer better loan terms to prospective buyers of GM and Chrysler L.L.C. cars and trucks as a way of steering business to those automakers.

In return for giving GMAC $5 billion in aid in December, the government got 5 million shares and told the firm it must extend financing services to bailed-out Chrysler, which filed for bankruptcy April 30.

On May 21, the Treasury Department announced a new $7.5 billion injection for GMAC. Of that, $4 billion is going to support its new loans to Chrysler dealers and customers. The remaining $3.5 billion is going toward boosting GMAC's capital base - still short of the $11.5 billion the government's "stress test" last month showed the firm needed if the economy worsened.

GMAC is expected to detail its plans to bolster its capital position by the government's June 8 deadline. As required by Treasury, new capital must represent $9.1 billion of GMAC's total effort.

To help GMAC raise the remaining capital, the Federal Deposit Insurance Corp. took the rare step of allowing the junk-rated company to gain access to its debt-guarantee program. GMAC will be allowed to issue as much as $7.4 billion in FDIC-backed debt. The FDIC guarantees the debt that GMAC would issue in case the company defaulted on payment.

The Federal Reserve also waived rules to give GMAC's new bank, called Ally Bank, more leeway to make loans to GM customers.

The government also required that GMAC assemble a new, smaller board of directors, which the company has been doing. It eventually will include the chief executive officer, two trustees appointed by Treasury to represent the government's interest, and three independent directors to be elected by the rest of the board.