Gold futures ended higher on Friday for the first time this week, up more than $22 an ounce for the month, but down 4 percent for the week after declining for three consecutive sessions. Silver gained more than 2 percent.

Gold futures for August delivery rose $9.80, or 1.1 percent, to $891.50 an ounce on the Comex division of the New York Mercantile Exchange. The contract gained 3.1 percent in May and has climbed 6.4 percent in 2008.

The metal closed out the week with a loss of 4.2 percent, but ended the month $22.10, or 2.5 percent higher.

Gold has had a difficult week, experiencing a sharp sell off due to profit taking, dollar strength and oil weakness, said March O'Byrne, a director at Gold and Silver Investments Ltd in a note.

Gold has had a difficult week, experiencing a sharp sell off due to profit taking, dollar strength and oil weakness.

Silver futures for July delivery rose 35 cents, or 2.1 percent, to $16.865 an ounce. The metal climbed 1.6 percent this month and has advanced 13 percent this year.

The dollar traded slightly lower against most of its major currency counterparts, on signals the Federal Reserve may raise borrowing costs by the end of the year. The dollar erased earlier modest gains but still on track to mark a positive month overall.

A recapture of the $890 or $900 prize might be very nice at this juncture, but much depends on black gold (oil) and the greenback as far as the yellow metal is concerned, said Jon Nadler, a senior analyst at Kitco Bullion Dealers.

Crude oil for July delivery closed at $127.35 a barrel, up 73 cents for the day. It recovered from a two-week low set earlier.

Also on the Nymex, July platinum rose $23.60 to close at $2,013.80 an ounce while June palladium added $7.20 to end at $435 an ounce on Nymex. July copper climbed 4.6 cents to finish at $3.606 a pound.