WASHINGTON — The Senate voted unanimously on Tuesday to require an audit of the Federal Reserve’s emergency actions during and after the 2008 financial crisis as part of broad legislation overhauling the nation’s financial regulatory system.

The amendment, proposed by Senator Bernard Sanders, independent of Vermont, would require the Government Accountability Office to scrutinize some $2 trillion in emergency loans that the Fed provided to some of the nation’s biggest banks.

The vote was 96 to 0.

Mr. Sanders, a professed socialist, has long demanded greater transparency at the central bank, and his original plan could have subjected the Fed to continuing audits of some of its routine operations. But he agreed to scale it back in the face of opposition from the White House, the Fed, the Treasury and some Senate colleagues.

While the Senate provision would require an audit of the Fed’s emergency operations beginning on Dec. 1, 2007, the House approved tougher audit requirements late last year in its version of the financial regulatory legislation. Once the larger Senate bill is adopted, the provisions will have to be reconciled.