Star Wars actor Mark Hamill has spoken of his admiration for Ukraine after lending his voice to an app linked to the country’s air defence.

The grave but calming baritone of the Luke Skywalker actor can be heard urging people to take cover when Russia unleashes aerial bombardments on Ukraine.

The intrusion of Hollywood science-fiction fantasy into the grim daily realities of war is a result of Hamill’s decision to help the downloadable app Air Alert.

When air raid sirens start howling, the app also warns Ukrainians that Russian missiles, bombs and deadly exploding drones may be incoming.

“Don’t be careless,” Hamill’s voice advises. “Your overconfidence is your weakness.”

Russia Ukraine War Mark Hamill
The Air Alert app warns of Russian attacks (Evgeniy Maloletka/AP)

The California-based actor said he has admired how Ukraine has “shown such resilience… under such terrible circumstances”.

Its fight against the Russian invasion, now in its second year, reminds him of the Star Wars saga, he said — of plucky rebels battling and ultimately defeating a vast, murderous empire.

He said voicing over the English-language version of the air-raid app and giving it his Star Wars touch was his way of helping out.

“A fairy tale about good versus evil is resonant with what’s going on in Ukraine,” Hamill said in an interview with The Associated Press.

“The Ukrainian people rallying to the cause and responding so heroically… It’s impossible not to be inspired by how they’ve weathered this storm.”

When the dangers pass, Hamill announces via the app that “the air alert is over”. He then signs off with an uplifting: “May the Force be with you.”

Hamill is also raising funds to buy reconnaissance drones for Ukrainian forces on the front lines. He has autographed Star Wars-themed posters that are being raffled off.

“Here I sit in the comfort of my own home when in Ukraine there are power outages and food shortages and people are really suffering,” he said. “It motivates me to do as much as I can.”

Although the app also has a Ukrainian-language setting, voiced by a woman, some Ukrainians prefer to have Hamill breaking the bad news that yet another Russian bombardment might be imminent.

Russia Ukraine War Mark Hamill
People sit in the subway after an air raid alarm, in Kyiv (Francisco Seco/AP)

On the worst days, sirens and the app sound every few hours, day and night. Some turn out to be false alarms but many others are real — and often deadly.

Bohdan Zvonyk, a 24-year-old app user who lives in Lviv, says he chose Hamill’s voiceover rather than the Ukrainian setting because he is trying to improve his English.

“Besides, we could use a little bit of the power that Hamill wishes us,” he said.

Ajax Systems, a Ukrainian security systems manufacturer that co-developed the app, hopes Hamill’s star power will encourage people outside Ukraine to download it — so they get a taste of the angst heaped on Ukrainians by nerve-shredding alarms and airborne death and destruction.

“With Mark’s approach, it won’t be so terrifying,” said Valentine Hrytsenko, the chief marketing officer at Ajax. “But they will understand somehow the context.”

In the invasion’s first year, air-raid alarms sounded more than 19,000 times across the country, so “of course people are getting tired”, he said. The app has been downloaded more than 14 million times.

Mr Hrytsenko is among those who use its English-language setting to hear Hamill’s voice.

“For Star Wars fans, it sounds really fantastic,” he said. “It’s kind of a Ukrainian mentality to find some humour even in the bad situation or to try to be positive.”