The Federal Reserve's balance sheet fell in the latest week, Fed data released on Thursday showed.

The Fed's balance sheet -- a broad gauge of its lending to the financial system -- fell to $2.290 trillion in the week ended March 31 from a record-high $2.296 trillion in the week ended March 24.

The data in the release coincides with the end of the Fed's program of buying mortgage securities, which came to a conclusion on March 31.

The mortgage purchases were a pillar of the Fed's quantitative easing program that was adopted to hold down home borrowing costs in a bid to revive the battered housing sector and the economy.

In the now-ended program, the Fed committed to buy about $175 billion of agency debt and $1.25 trillion of agency mortgage-backed securities.

The Fed's holdings of mortgage-backed securities backed by U.S. housing finance agencies Fannie Mae and Freddie Mac fell to $1.069 trillion from $1.074 trillion a week earlier.

The central bank's ownership of debt issued by Fannie Mae, Freddie Mac and the Federal Home Loan Bank System was $168.99 billion versus $167.49 billion a week ago.

Its direct overnight lending to top-rated banks fell from last week. Primary credit via the Fed's discount window averaged $7.66 billion a day versus $10.75 billion a day in the previous week.

The weekly release is usually published at 4:30 p.m. on Thursday's but was delayed this week.

The Fed said in the release that data had been modified to reflect a revision to the loan restructuring adjustment associated with the revolving credit extended to American International Group, Inc.

It was also modified to incorporate fair value adjustments associated with the Term Asset-Backed Securities Loan Facility, the Fed added.

(Reporting by Burton Frierson; editing by Leslie Adler)