* China sharply devalues currency, yuan sinks to 3-year low
* China's c.bank changes the way it sets yuan midpoint
* Australian and NZ dollars hit by China move
* Euro edges higher after Greek bailout agreement
By Jemima Kelly
LONDON, Aug 11 (Reuters) - The yuan suffered its biggest fall in over two decades on Tuesday, hitting a three-year low after the Chinese central bank surprised markets by devaluing it by almost 2 percent, firing a broadside in what many analysts saw as a looming currency war.
The bank described the move as a "one-off depreciation" and billed it as free-market reform but, after a run of weak Chinese data, with exports tumbling over 8 percent in July, economists said the timing suggested it was aimed at boosting the competitiveness of the world's second-biggest economy.
The currencies of some of countries that do much of their trade with China, such as the Australian and New Zealand dollars, were also dragged down by the move, shedding as much as 1.3 percent at 1 percent respectively against their U.S. counterpart. The Japanese yen hit a two-month low.
"What's interesting about today's move? It's not the scale of it," said Simon Derrick, head of currency research at BNY Mellon in London. "Yes, we've gone back to where we were in September 2012 ... but the dollar index is up 22 percent since then, so it's a drop in the ocean in those terms.
"It does look, however modest, like an attempt to recoup just a small amount of competitive edge it's lost in international markets ... What happens over the next few days matters. If we have a currency that moves much more freely, fine. If, however, we go back and it's just repegged ... that is currency war."
The yuan midpoint was set at 6.2298 per U.S. dollar, compared with the 6.1162 mid-point on Monday. The central bank said it would now base the yuan's midpoint on market makers' quotes and the previous day's closing price.
Spot yuan tumbled around 2 percent to as low as 6.3360, the weakest since September 2012 and the biggest drop since the currency was officially devalued in 1994. The yuan had been locked in an extremely narrow intraday range since March, varying only 0.3 percent.
"With fears of an economic slowdown mounting, devaluing the yuan was the only thing China had not tried after implementing monetary, fiscal and equity-boosting policies," said Masafumi Yamamoto, senior strategist at Monex in Tokyo.
"Devaluation of the yuan likely won't end here. Currencies like the Singapore dollar, South Korean won and Taiwan dollar, which stand to compete with China, are falling, and today's move could generate headlines heralding the start of a devaluation war."