* 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 Barbara Lewis and Maria Tsvetkova
BRUSSELS/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.
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.
Moscow annexed Ukraine's Crimea peninsula in the Black Sea in March, and Western countries say it funded and armed pro-Russian rebels that rose up in the east of Ukraine in April.
Since June, 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 Malaysian 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.
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 President Vladimir 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 the banner for their movement.
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 NATO military officer, speaking on condition of anonymity, said that Russia's recent build-up at the border included tanks, infantry, artillery, air defence systems, logistics troops, special forces, and various aircraft.
The confrontation between Moscow and the West has turned into a trade war since the United States and EU tightened their sanctions to hit Russia's oil, defence and finance sectors.
President Vladimir Putin ordered his government on Tuesday to work out retaliatory sanctions, but said the government should make sure consumers don't get hit.
Russia has so far used safety inspections to ban food imports from some Western countries, extending the ban on Wednesday to beef and cattle from Romania. Moscow has already imposed bans on Ukrainian juice and dairy, Polish fruit and vegetables and Australian beef, and has said it might target Greek fruit and U.S. poultry.
The Russian central bank warned on Tuesday such bans could make it harder to control inflation. Imports tend to be cheaper than local produce.
Coca-Cola Co said on Wednesday it had pulled advertisements off four Russian TV channels, although it denied the decision was due to sanctions, saying it was rethinking its marketing because of falling sales. (Additional reporting by Natalia Zinets and Richard Balmforth in Kiev, Lina Kushch in Donetsk, Barbara Lewis and Tom Koerkemeier in Brussels, Maria Kiselyova in Moscow and Adrian Croft in London; Writing by Peter Graff; Editing by Will Waterman)