TROSTIANETS, Ukraine, Jan 18 (Reuters) - An excavator belches out fumes as it clears earth and rubble from between the train and bus stations in the Ukrainian town of Trostianets to make way for a reimagined transport hub.

Badly damaged in fighting with Russian forces almost two years ago, Trostianets is one of six settlements being rebuilt with state funds in a pilot programme to develop the skills and experience needed for a far broader reconstruction drive later.

Mayor Yuriy Bova said time was running out to breathe life back into towns, or risk losing millions of Ukrainians who could help redevelop the country to permanent exile in Europe.

"We're fighting for every person who should return; for every child who needs to return and build their future here," he told Reuters in the town, barely 30 km (20 miles) from Russia.

"To walk around and see this every day, that will morally traumatise a person," Bova said of the ruined northeastern town. "We need to restore everything, starting with cafes, libraries, factories, schools, hospitals."

Officials in Kyiv have also signaled the urgence of rebuilding Ukraine, an effort that will require hundreds of billions of dollars and involve more than quick fixes to critical sites such as hospitals, power stations and railways.

The war, however, shows no signs of abating. Short on cash, Ukraine is defending against new Russian attacks after its own counteroffensive failed to yield significant gains. Moscow has also resumed a campaign of mass air strikes on population centres far beyond the front line.

For Pavlo Kuzmenko, the mayor of Okhtyrka, a town only 20 km down the road from Trostianets that also bears the scars of heavy Russian bombing at the start of the war, resurrecting town squares is a luxury Ukraine cannot afford right now.

Officials in Okhtyrka were slow to finish clearing away the rubble on the main boulevard that was once the city hall and have not yet fixed the gutted department store across the street. Most schools, however, have been repaired with new windows, roofing or bomb shelters, thanks in large part to international donors.

Kuzmenko, who publicly criticised the plans for Trostianets last year and bemoaned a lack of resources, said the focus should be on patching up homes and critical infrastructure only. Any other available funds should go to the military.

"There is plenty to rebuild," Kuzmenko told Reuters. "Squares, and all their decorations, can be done after the war."

Standing near the remains of the city hall, Okhtyrka resident Antonina Dmytrychenko, 65, said she agreed with her mayor: "First we need victory, then reconstruction."

The different views in the neighbouring towns reflect a broader debate about wartime spending playing out across Ukraine. Most visibly, a growing grassroots protest movement is demanding that discretionary projects, such as sprucing up streets and public spaces, be shelved in favour of the military.

'ECONOMIES WIN WARS'

In a sign of the tension, officials in the Odesa region cancelled more than $9 million of tenders during the last three months of 2023, saying spending on things such as road repairs, the renovation of a stadium and software was "unacceptable" during wartime.

The disputes highlight the need for a clearly communicated government strategy for what recovery and, more broadly, a war-adapted economy should look like, said Orysia Lutsevych at the Chatham House think-tank in London.

She said officials must urgently unlock Ukraine's economic potential by restoring income-generating growth opportunities that can help defeat Russia - and that meant luring people back as well as stopping more leaving the country for good.

"Militaries win battles, but economies win wars. It's part of the same equation," she said.

It might make sense, for example, to build more schools in the comparably safer western city of Lviv for the many Ukrainians displaced there by fighting elsewhere, so they will stay and contribute to the wartime economy, Lutsevych said.

"This is what rebuilding is: maybe it's not fancy playgrounds, maybe it's not new zoos," she said. "But it must be a category of projects that fits within the wider strategy of how Ukraine will sustain this war."

One of the officials in charge of rebuilding Ukraine, Mustafa Nayyem, acknowledged that reviving heavily damaged towns such as Trostianets would require major administrative muscle.

"The state has never done a comprehensive reconstruction of settlements before," Nayyem, head of Ukraine's Agency for Restoration and Infrastructure Development, told Reuters. "We don't have that kind of experience."

That's why Kyiv picked six projects, each with different challenges, to be financed by a state fund comprised mainly of seized Russian assets. The aim was a complete transformation of those places into something better, Prime Minister Denys Shmyhal said when unveiling the programme in April.

In one case, a village is being entirely rebuilt, another is undergoing mass repairs of housing, while in Trostianets, which is home to a Mondelez chocolate factory, the focus is on several key projects in part to help restore economic life.

The skills required range from the often painstaking work of establishing legal ownership of properties going back generations to replanning entire apartment blocks or new energy networks.

'NOT RENEWING LIBRARIES'

So far, more than $1.6 billion has been earmarked from the fund for reconstruction, Prime Minister Shmyhal said in October. The pilot projects received about $86 million last year, though the 2024 budget has not yet been set, a spokesperson for the reconstruction agency said.

Overall, the World Bank has estimated that rebuilding Ukraine will cost more than $400 billion over the next decade, and Western lenders have signalled they are prepared to provide the bulk of the financing.

But the ongoing war has made long-term planning difficult, Nayyem said, citing the destruction of the Kakhovka dam in June. The disaster forced his agency to rush to build a critical water supply line in southeastern Ukraine in a matter of months, sapping time and resources.

What officials can plan for, Nayyem said, was the "infrastructure of reconstruction" - firming up standards and procedures, building teams and nurturing relationships with international partners.

"These are things that we are developing to the maximum in preparation for the moment when we can allow ourselves to, more or less, plan in greater detail," he said. "And it isn't necessarily only after our victory."

Nayyem defended the pilot projects against critics such as Kuzmenko, saying no one was rebuilding anything unnecessary, just homes and the services people need to live.

He said strategic roads facilitating military movements or trade across Ukraine, as well as administrative buildings, should also be priorities.

"We're not renewing libraries or museums," he said.

In Trostianets, the plan is to restore two apartment blocks, three medical facilities, the train station, the square, another building nearby and a main road through the town.

Money from international donors, meanwhile, has already helped rebuild a new wing of the main city hospital.

"We believe our town will become even better, to the detriment of our enemies," said Natalia Androsova, 60, one of the many locals in Trostianets who praised mayor Bova for his leadership and for attracting state funding.

The five other pilot projects are in Borodianka and Moshchun near the capital Kyiv, Yahidne in the north, Tsyrkuny in the east, and Posad-Pokrovske in the south.

Despite the damage in Okhtyrka, which resisted a Russian onslaught despite three weeks of intense shelling, the town is full of life as families criss-cross a park and celebrate special occasions at one of several popular restaurants.

But some yearn for a sense of normalcy beyond critical or immediate needs. Yaroslav Bybyk, 19, said he wished officials would do more to revive the cultural and youth scene which flourished there before the war.

"I haven't gone out much in the last few months," he said. "I don't see the point."

(Additional reporting by Vitalii Hnidyi and Valentyn Ogirenko; Editing by Mike Collett-White and David Clarke)