The Federal Reserve's balance sheet shrank in the latest week, partly due to a decline in its holdings of mortgage-related securities, Fed data released on Thursday showed.

The fall in holdings of agency debt and mortgage-backed bonds came as the Fed this week reinstated its program of purchasing Treasuries in a bid to lower long-term interest rates and support the economic recovery, which has shown signs of weakening.

The balance sheet -- a broad gauge of Fed lending to the financial system -- fell to $2.297 trillion in the week ended Aug 18 from $2.310 trillion the previous week.

The central bank's ownership of mortgage bonds guaranteed by Fannie Mae, Freddie Mac and the Government National Mortgage Association (Ginnie Mae) fell to $1.113 trillion on Wednesday from $1.119 trillion a week earlier.

The Fed's holdings of debt issued by Fannie, Freddie and the Federal Home Loan Bank system slipped to $157.21 billion from the previous week's $159.38 billion.

At the same time, U.S. government securities held by the central bank increased, to $779.55 billion on Wednesday from $777.00 billion last week.

After its Aug 10 policy meeting, the Fed said it will use money from maturing mortgage securities it owns to buy Treasuries with the aim of maintaining its holdings of securities at about $2.054 trillion.

In 2009, the Fed bought $300 billion Treasuries over a six-month period.

Earlier Thursday, the Fed bought $3.61 billion in Treasuries after it purchased $2.55 billion two days ago.

As for emergency lending, the Fed said overnight direct loans to credit-worthy banks via its discount window averaged $12 million a day in the week ended Wednesday, slower than the $14 million daily pace the previous week.

(Reporting by Richard Leong, Editing by Chizu Nomiyama)