(Repeats Monday report)
* Ukraine buys U.S. coal as Trump tries to help miners
* Deal followed Poroshenko visit to the White House
* Kiev short of coal due to rebellion, conflict with Russia
* Anthracite contract "a matter of necessity" - energy chief
KIEV, Feb 19 (Reuters) - For the first time in Ukraine's history, U.S. anthracite is helping to keep the lights on and the heating going this winter following a deal that has also helped to warm Kiev's relations with President Donald Trump.
The Ukrainian state-owned company that imported the coal told Reuters that the deal made commercial sense. But it was also politically expedient, according to a person involved in the talks on the agreement and power industry insiders.
On Trump's side it provided much-needed orders for a coal-producing region of the United States which was a vital constituency in his 2016 presidential election victory.
On the Ukrainian side the deal helped to win favour with the White House, whose support Kiev needs in its conflict with Russia, as well as opening up a new source of coal at a time when its traditional supplies are disrupted.
Trump's campaign call to improve relations with the Kremlin alarmed the pro-Western leadership in Ukraine, which lost Crimea to Russia in 2014 and is still fighting pro-Moscow separatists.
However, things looked up when President Petro Poroshenko visited the White House on June 20 last year. "The meeting with Trump was a key point, a milestone," a Ukrainian government source told Reuters, requesting anonymity.
The Americans had set particular store by supplying coal to Ukraine. "I felt that for them it is important," said the source, who was present at the talks that also included a session with Vice President Mike Pence.
Despite Trump's incentives, U.S. utilities are shutting coal-fired plants and shifting to gas, wind and solar power. Ailing U.S. mining companies are therefore boosting exports to Asia and seeking new buyers among eastern European countries trying to diversify from Russian supplies.
Trump, who championed U.S. coal producers on the campaign trail, pressed the message after meeting Poroshenko. "Ukraine already tells us they need millions and millions of metric tons right now," he said in a speech nine days later. "We want to sell it to them, and to everyone else all over the globe who need it."
The deal with Kiev was sealed the following month, after which U.S. Commerce Secretary Wilbur Ross said: "As promised during the campaign, President Trump is unshackling American energy with each day on the job."
The deal helped to "bolster a key strategic partner against regional pressures that seek to undermine U.S. interests", Ross added, referring to past Russian attempts to restrict natural gas flows to its western neighbours.
A MATTER OF NECESSITY
Ukraine was once a major producer of anthracite, a coal used in power generation, but it has faced a shortage in recent winters as it lost control of almost all its mines in eastern areas to the separatists.
Along with South Africa, Ukrainian-owned mines in Russia have been the main source of anthracite imports but this is fraught with uncertainty. In the past Moscow has cut off gas supplies to the country over disputes with Kiev, while the Ukrainian government considered forbidding anthracite imports from Russia in 2017 although no ban has yet been imposed.
Overall anthracite imports shot up to 3.05 million tonnes in the first 11 months of 2017 from just 0.05 million in all of 2013 - the year before the rebellion erupted.
Neighbouring Poland, which Trump visited in July, is also turning increasingly to U.S. coal. Its imports from the United States jumped five-fold last year to 839,000 tonnes, data from the state-run ARP agency showed.
In July Ukrainian state-owned energy company Centrenergo announced the deal with U.S. company Xcoal for the supply of up to 700,000 tonnes of anthracite.
Centrenergo initially said it would pay $113 per tonne for the first shipment, a price industry experts and traders told Reuters was expensive compared with alternatives.
However, chief executive Oleg Kozemko said the cost varied according to the quality of the coal delivered, so Centrenergo had paid around $100 per tonne on average for the 410,000 tonnes supplied by the end of 2017.
Kozemko said in an interview that the U.S. deal was Centrenergo's only viable option after three tenders it launched earlier last year had failed.
"The idea to sign a contract with Xcoal was a matter of necessity," he said. "We had agreements but they didn't work out, because the pricing that they discussed with us and that we signed an agreement on didn't work out."
Data on the state tenders registry and documents seen by Reuters show that two of the tenders failed due to a lack of bids, while the results of the third were cancelled.
If that contract had worked out, Centrenergo would have paid around $96 per tonne, according to Reuters calculations based on the exchange rate at the time of the tender in April.
Energy expert Andriy Gerus told Reuters the Xcoal deal "probably helps Ukraine to build some good political connections with the USA and that is quite important right now".
The anthracite for Centrenergo is mined in Pennsylvania, which backed Trump in 2016. This marked the first time a Republican presidential candidate had won the state since 1988, and followed Trump's pledge to reverse the coal industry's history of plant closures and lay-offs in recent years.
Centrenergo says it and Xcoal agreed the contract independently of their governments and without any political pressure. However, Kozemko said: "If talks between the heads of our countries helped in this, then we can only say thank you... It was a mutual desire."
For the Ukrainian authorities, the diplomatic benefit is clear. When the first shipment of U.S. anthracite arrived in September, Poroshenko tweeted a photo of himself shaking hands with Trump in Washington. "As agreed with zrealDonaldTrump, first American coal has reached Ukraine," he wrote.
Poroshenko's press service said the deal "is an exact example of when the friendly and warm atmosphere of one conversation helps strengthen the foundations of a strategic partnership in the interests of both sides for the future".
The Washington meeting also discussed U.S.-Ukrainian military and technical cooperation. Soon after, the Trump administration said it was considering supplying defensive weapons to Ukraine to counter the Russian-backed separatists.
In late December the U.S. State Department announced that the provision of "enhanced defensive capabilities" had been approved.
Kozemko said the Xcoal deal was likely to be only the beginning of Centrenergo's trade relations with the United States as it is currently holding talks on supplies of bituminous coal, a poorer quality variety.
"It's good that we studied the U.S. market because we had never looked at it before. We see big prospects for bituminous coal," he said, adding that other Ukrainian firms were thinking similarly. "We showed how to bring coal from America and they are following our lead." (Additional reporting by Natalia Zinets and Pavel Polityuk in Kiev and Agnieszka Barteczko in Warsaw; editing by David Stamp)