UPDATE 2-Glencore signs deals to buy 49 percent of Hunter Valley coal

* Deal follows bidding war

* Glencore expects completion in six months

* Share price edges higher (Updates with Glencore announcement, analyst comment)

SYDNEY/LONDON, July 27 (Reuters) - Glencore said on Thursday it had signed agreements to buy a 49 percent stake in coal mines in Australia's Hunter Valley for just over $1.1 billion, getting a share of assets it was expected to miss out on to China's Yancoal.

Glencore has long wanted Rio Tinto's Hunter Valley Operations (HVO) but Yancoal Australia was confirmed last month as the preferred bidder for Rio's Australian Coal & Allied division, which owns the mines.

Glencore said on Thursday, however, it would buy a 16.6 percent stake in HVO from Yancoal and 32.4 percent from Mitsubishi Corp, and then form a joint venture to run the mines with Yancoal, which will keep a 51 percent stake.

Yancoal's Chinese parent company Yanzhou said on Wednesday its board had approved the transfer of the 16.6 percent interest in the HVO joint venture, without naming the buyer, provided the Rio sale was completed.

HVO is widely regarded as the more valuable of the two Hunter Valley coal complexes that Yancoal is set to acquire from Rio Tinto for $2.7 billion after Glencore lost out in a bidding war with the Chinese-owned coal miner.

Glencore wants the assets that adjoin operations it already owns in the Hunter Valley. It first tried to acquire Coal & Allied in 2015, when Rio Tinto made it clear that coal was no longer part of its growth strategy.

Analysts said Glencore planned to blend the HVO coal with coal from its existing operations to customise shipments to power-generating customers in Japan, South Korea and Taiwan.

Glencore is already the world's largest exporter of sea-traded thermal coal, with interests in 28 mines in Australia, Colombia and South Africa.

Under Thursday's announcement, Glencore will pay $1.139 billion in cash and a 27.9 percent share of $240 million in non-contingent royalties over five years, as well as subscribing to $300 million worth of shares Yancoal is selling as part of a capital increase to fund its Rio Tinto deal.

The joint venture deal is expected to be completed within six months.

Analysts said Glencore and Yancoal both gained as Glencore would get the assets it wanted most and Yancoal would reduce the cost of its deal with Rio.

BMO Capital Markets analyst Edward Sterck calculated the price paid by Glencore would be about 8 percent lower than the implied valuation of Yancoal's bid, though Glencore was only getting a minority stake as well as buying Yancoal shares.

Glencore's share price rose 0.3 percent on Thursday, recovering from a decline in early trade after the company cut its 2017 production targets. (Additional reporting by Sonali Paul and Lee Chyen Yee in Hong Kong; editing by David Clarke)