* Western alliance says Moscow could use "humanitarian" pretext to invade
* Ukraine says 18 troops killed in latest day of fighting
* Putin orders retaliation to Western sanctions
By Dmitry Zhdannikov and Maria Tsvetkova
MOSCOW/DONETSK, Ukraine, Aug 6 (Reuters) - Russia has massed around 20,000 combat-ready troops on Ukraine's border and could use the pretext of a humanitarian mission to invade, NATO said on Wednesday, its starkest warning yet that Moscow could soon mount a ground assault against its neighbour.
President Vladimir Putin announced Moscow's biggest economic response to Western sanctions, launching a tit-for-tat trade war by ordering his government to restrict imports of food from countries that have imposed sanctions on Russia.
With fighting escalating and rebels losing ground in the weeks since a Malaysian airliner was shot down over separatist-held territory, Russia has announced military exercises this week in the border region.
"We're not going to guess what's on Russia's mind, but we can see what Russia is doing on the ground - and that is of great concern. Russia has amassed around 20,000 combat-ready troops on Ukraine's eastern border," NATO spokeswoman Oana Lungescu said in an emailed statement.
Moscow could use "the pretext of a humanitarian or peace-keeping mission as an excuse to send troops into Eastern Ukraine", she said. A NATO military officer, speaking on condition of anonymity, said Russia's build-up at the border included tanks, infantry, artillery, air defence systems, logistics troops, special forces, and various aircraft.
A Russian defence ministry spokesman dismissed the NATO accusations: "We've been hearing this for three months already."
Moscow annexed Ukraine's Crimea peninsula in the Black Sea in March, and Western countries say it has funded and armed pro-Russian rebels who rose up in the east of Ukraine in April.
Over the past two months, government troops have gained ground against the rebels, who are led almost exclusively by Russian citizens and have managed to acquire tanks, missiles and other heavy weaponry that Kiev and its Western allies say can only have come from across the frontier.
Kiev said 18 Ukrainian servicemen had been killed and 54 injured in 25 separate clashes over the past day in eastern Ukraine. Military spokesman Andriy Lysenko said troops had been shelled from inside Russian territory and frontier guards had come under a four-hour mortar and artillery attack.
Fighting has intensified since Malaysia Airlines flight MH17 crashed on July 17, killing all 298 people on board. Western countries say it was shot down by rebels with an advanced anti-aircraft missile supplied by Russia. Moscow denies blame, and the Russians who command the rebels deny they had such missiles.
The United States and the European Union imposed sanctions on Russia that were mild at first but have been tightened sharply since the airliner was brought down.
On Wednesday, Putin ordered his government to come up with a list of agricultural products from countries that imposed sanctions on Russia which would be banned in retaliation.
Moscow has already banned Polish fruit and vegetables, Romanian beef and a handful of other products using food safety as a justification. But Putin's order strips off that figleaf, making clear the measures are a political response to sanctions.
Finland's prime minister warned of dire economic consequences for his country, even a possible repeat of the financial crisis of six years ago.
Russia imported $43 billion worth of food last year. It is the biggest buyer of European fruit and vegetables and a major global buyer of meat, fish and poultry.
Nevertheless, the impact of Putin's new measures may be limited: with the rouble falling and inflation rising, he instructed his government to protect consumers when drawing up its ban list. That means popular items such as U.S. chicken quarters - a staple of the Russian diet since the early 1990s when they earned the nickname "Bush's legs" after the then American president - may be spared, at least for now.
Kiev's military offensive has pushed the rebels out of many of their strongholds, leaving them largely besieged in the cities of Donetsk and Luhansk, which the rebels have proclaimed capitals of two "people's republics".
Residents in Donetsk, east Ukraine's main industrial hub and now the principal rebel redoubt, said Ukrainian warplanes had carried out air strikes overnight.
Reuters journalists heard the planes roar overhead and massive explosions during the night. In the morning, an industrial district 2-3 km (1-2 miles) from the city centre was pocked with craters, including two huge holes 7 metres (7 yards) wide and 2 metres deep, ripped into the asphalt.
"The planes were flying low. Then there were two massive explosions and the glass was blown out of the window. It was terrifying. This is war. There will never be peace," said Nadezhda, a woman who lived nearby.
Government military spokesman Lysenko denied Ukrainian planes had carried out air strikes: "The Ukrainian military does not bomb the towns of Donetsk and Luhansk or any other similar populated places," he said.
Many residents have fled the two cities, but hundreds of thousands of people are still living in them, increasingly fearful that they will bear the brunt of a full-blown assault.
The latest Russian troop build-up on the border is not the first time Moscow has concentrated forces there: NATO estimated Russia had as many as 40,000 troops in place earlier in the crisis before Putin pulled them back in June.
But the government's advance since then may be prompting new action from the Kremlin, after months in which state-controlled Russian media have mounted a sustained campaign of anti-Ukrainian agitation and nationalist pride focused on Crimea.
Since March, Putin has vowed to use military force to protect Russian-speaking "compatriots" across the former Soviet Union. He branded southern and eastern Ukraine "New Russia", a name the rebels took up as catch-all for most militia groups.
Most people in eastern and southern Ukraine are ethnic Ukrainians who speak Russian as their native language.
Polish Prime Minister Donald Tusk said on Wednesday the threat of a direct intervention by Russia's military in Ukraine has risen over the last couple of days.
A senior U.S. official said Washington was keeping a "very close eye" on Russian activity at the border.
"The last few weeks have not been good ones for the Russians. They have seen the separatists lose ground and the Malaysian airliner shoot-down was a public relations disaster for the Russians. Unfortunately we have not seen a sense that the Russians are acting on the negative feedback and looking to deescalate. In fact we've see signs that Putin seems to be doubling down," said the official.
"There's the buildup on the border, no change in the propaganda machine in Russia, talk of the need for humanitarian peacekeeping in Ukraine itself." (Additional reporting by Natalia Zinets and Richard Balmforth in Kiev, Lina Kushch in Donetsk, Barbara Lewis and Tom Koerkemeier in Brussels, Maria Kiselyova and Polina Dewitt in Moscow, Matt Spetalnick and Mark Hosenball in Washington and Adrian Croft in London; Writing by Peter Graff; editing by David Stamp)