The U.S. Federal Reserve's balance sheet shrunk in the latest week but failed to fall below the $2 trillion mark as both discount window borrowing and the value of some assets acquired in connection with financial sector rescue efforts rose.

In its latest balance sheet release Thursday, the Fed said it has cut the value of credit extended to the struggling American International Group (AIG) by $1.3 billion to reflect the impact of a March agreement to restructure the insurance giant's federal loan package.

Credit extended to AIG on Wednesday stood at $42.20 billion, not including the value of AIG assets the Fed has acquired separate of a credit line extended to the company.

The Fed said it expects the loan to AIG as well as interest and fees "will be fully repaid."

The Fed also reported assets it acquired in connection with a rescue of Bear Stearns fell by $186 million to reach $25.87 billion on Wednesday.

The value of residential mortgage-backed securities acquired from AIG as part of its government rescue plan, fell $616 million to $15.14 billion, the Fed said.

The value of collateralized-debt obligations acquired from AIG, however, rose $2.3 billion.

Overall, the Fed's asset holdings in the week ended July 29 fell to $2 trillion from $2.04 trillion a week earlier.

Total discount window borrowing crept up to $109.89 billion on Wednesday from $109.14 billion a week earlier.

Borrowing by commercial banks through the Fed's discount window also rose slightly, climbing to $36.37 billion on Wednesday from $33.45 billion a week earlier. Meanwhile, Borrowing by primary dealers through a credit facility created following the collapse of Bear Stearns on Wednesday remained at zero for an 12th-straight week.

The Fed's portfolio of Treasury securities in the latest week rose $3.03 billion to $695.76 billion as holdings of mortgage-backed securities meanwhile dipped to $542.89 billion from $545.47 billion a week earlier.

The Fed's net portfolio holdings in connection with its commercial-paper funding facility fell $42.55 billion in the latest week to $67.30 billion Wednesday.

"The big trend has been a massive shrinking of short-term lending programs," said Zach Pandl, economist at Nomura Securities. "Phase one of the exit strategy is nearing its end."

The Fed's holdings under the Term Asset Backed Securities Loan Facility rose to $30.42 billion from $29.98 billion a week earlier.

Meanwhile, U.S. government securities held in custody on behalf of foreign official accounts climbed to $2.794 trillion from $2.790 trillion in the previous week.

Treasurys held in custody on behalf of foreign official accounts as of Wednesday also rose, growing to $2.002 trillion from $1.998 trillion the week before. Meanwhile, holdings of agency securities fell, declining to $791.25 billion from the prior week's $792.06 billion.

-By Meena Thiruvengadam, Dow Jones Newswires; 202-862-6629; meena.thiruvengadam@dowjones.com

(Brian Blackstone contributed to this article.)