PRECIOUS-Gold firms on weak dollar, risk aversion

* Spot gold may retest resistance at $1,254 per ounce - technicals

* Gold on track for third straight weekly decline

(Updates with quotes, prices) BENGALURU, June 23 (Reuters) - Gold prices edged higher on Friday as the dollar softened and risk aversion due to geopolitical events buoyed the safe-haven appeal of the metal. "Risk aversion is on the rise, mainly due to what's happening in the Middle East and also the news about China cracking down on some loans made overseas last year," said Richard Xu, a fund manager at China's biggest gold exchange-traded fund, HuaAn Gold. China's banking regulator has ordered a group of lenders to assess their exposure to offshore acquisitions by a handful of companies that have been on an overseas buying spree, two people familiar with the matter said on Thursday.

Spot gold was up 0.1 percent at $1,251.96 per ounce,

as of 0443 GMT. It was down 0.1 percent for the week, and was headed for a third consecutive weekly fall.

U.S. gold futures for August delivery climbed 0.3

percent to $1,252.60 per ounce. The political situation in the United States, the UK, and North Korea-related developments are among the other factors creating a safe-haven demand for gold, said Brian Lan, managing director at gold dealer GoldSilver Central in Singapore. Tensions rose as North Korea carried out another test of a rocket engine that the United States believes could be part of its programme to develop an intercontinental ballistic missile, a U.S. official told Reuters on Thursday. Gold is used as an alternative investment during situations of political and financial uncertainty. Investors will keep an eye on key U.S. economic data due next week for cues on the U.S. Federal Reserve's rate hike decision. U.S. data due next week include the June consumer confidence indicator, pending home sales, crude oil inventories, revised first quarter GDP and the PCE price index. "The Fed has mentioned it will most likely raise rates one more time. The data will be important to know whether it is a favorable time for the central bank to raise rates," Lan added.

Spot gold may retest a resistance at $1,254 per

ounce, with a good chance of breaking above this level and rising more towards the next resistance at $1,262, according to Reuters technical analyst Wang Tao. The dollar was down 0.1 percent against a basket of currencies, drifting away from the near one-month peak of 111.790 hit on Tuesday.

Among other precious metals, silver rose 0.4 percent

to $16.60 per ounce.

Platinum climbed 0.2 percent to $922.10 per ounce, while palladium slipped 0.1 percent to $882.75 per ounce.

(Reporting by Nithin Prasad and Vijaykumar Vedala in Bengaluru; Editing by Richard Pullin and Sherry Jacob-Phillips)