Gold surged more than 2 percent on Friday on end-of-quarter short-covering, but bullion still posted its largest quarterly loss in at least 45 years due to selling amid fears the U.S. Federal Reserve may wind down its stimulus program.

Bullion's 2.3 percent rally was particularly impressive on a day that had little macroeconomic news and no dramatic movements in other commodities and financial markets. Silver jumped 6 percent for its biggest one-day jump since January 2012.

After Friday's rally, gold is still 23 percent lower for the second quarter, its biggest decline since at least 1968, Reuters data shows.

Some investors aggressively bought back their bearish bets on fears gold could rebound, while others squared their books on the last trading day of a dismal second quarter after Thursday's 2 percent drop as funds polished portfolios through the practice of window-dressing.

"You've seen an over-run on the downside here. I am not positive that this is the low but we are very close to it," said John Hummel, AIS Group's chief investment officer, who manages $400 million in assets including a managed futures fund.