The U.S. Federal Reserve's balance sheet grew to its largest since May on a hefty increase in its holding of mortgage-backed securities, Fed data showed on Thursday.

The Fed's balance sheet liabilities -- a broad gauge of its lending to the financial system -- rose to $2.125 trillion on Wednesday from $2.072 trillion a week earlier.

This was the highest level since May 20 when the balance sheet stood at $2.165 trillion.

The Fed -- the U.S. central bank -- has been buying Treasuries and mortgage-related bonds in an effort to lower borrowing costs and end the worst U.S. economic downturn in 70 years.

The Fed's holding of mortgage-backed securities rose to $685.06 billion on Wednesday from $625.28 billion a week ago.

Its holdings of Treasuries edged up to $759.80 billion from $757.77 billion last week.

In contrast, the Fed's commercial paper holdings fell to $42.97 billion on Wednesday from $45.67 billion a week ago.

Furthermore, financial companies borrowed a tad more from the Fed in the latest week. They borrowed at a daily rate of $111.49 billion in the week ended Wednesday, up from a daily average of $107.15 billion in the previous week.

Top-rated banks however relied less on the Fed's discount window for overnight funds. They borrowed at a daily rate of $28.68 billion, slower than last week's $30.37 billion daily average.

The Fed's credit lines making dollars available overseas averaged $61.10 billion a day in the latest week, compared with a daily rate of $61.61 billion in the prior week.

(Reporting by Richard Leong; Editing by James Dalgleish)