Last-minute maneuvering in the Senate allowed the Federal Reserve to sidestep legislation that would have exposed its interest-rate decision-making to congressional auditors.

Pressure from the Obama administration led Senate lawmakers to alter a provision pushed by Sen. Bernie Sanders (I., Vt.) that was gaining momentum despite opposition from the Treasury and the Fed. It would have largely repealed a 32-year-old law that shields Fed monetary policy from congressional auditors.

The compromise, endorsed by Senate Banking Committee Chairman Christopher Dodd (D., Conn.) and the Treasury, would require the Fed to disclose more details about its lending during the financial crisis. It would also require a one-time audit of those loans and a one-time review of Fed governance. A formal vote was pushed back until next week.

Thursday's Senate showdown came after senators on the left and right joined forces to support Mr. Sanders' provision.

"At a time when our entire financial system almost collapsed, we cannot let the Fed operate in secrecy any longer," Mr. Sanders said. "The American people have a right to know."