Filmmakers have long steered clear of the Irish famine, a trauma of starvation, poverty and suffering that remains a sacred national topic. It seemed too bleak, too depressing, too fraught – get a historical detail wrong and you risked accusations of insensitivity and exploitation.

Now, 170 years after a million people died and more than a million emigrated, comes Black 47, a big-screen blockbuster that uses the famine as a western-style revenge thriller. There are lots of muskets, explosions and horse chases, the lead actors are Australian, and many of the interiors were shot in Luxembourg.

And the Irish love it. Cinemagoers flocked to the film’s opening weekend, making it the biggest grossing Irish film in Ireland this year with a box office of €444,000 (£395,000).

Critics have lavished praise. “It’s The Outlaw Josey Wales with more rain and fewer Comanche,” said the Irish Times, citing Clint Eastwood’s 1976 revisionist western. “An admirable attempt to go where no one has gone before,” said the Irish Independent’s review. “The kind of Irish film John Ford might have made if he’d been inclined to move beyond the wistful paddywhackery of The Quiet Man.”

Quick Guide The Irish famine Show The Irish famine ran from 1845 to 1849 and killed an estimated one million people from hunger and disease. A million more emigrated.

A population boom, extreme poverty and sub-division of land into tiny plots left rural communities dependent on potatoes. When blight wiped out crops the result was disaster, especially in 1847, creating the nickname Black '47. Ireland was then part of the United Kingdom but the British government responded late and feebly, leaving people to eat grass while wealthy landowners in some of the most stricken areas continued exporting food. The catastrophe, which according to some measures continued until 1852, permanently transformed Ireland's demographics and socio-political structure and led to generations of emigration. Known in Ireland as the Great Hunger, it has been immortalised in poetry, ballads and plays.

The $10m Irish-Luxembourgian co-production is set for a north American premiere at the Toronto International Film Festival this week before opening in the UK and US on 28 September.

It stars James Frecheville as an Irish ranger who returns home in 1847 after fighting for the British army in Afghanistan and discovers that his mother has died of hunger, his brother has been hanged, and the rest of his family is inhabiting a wasteland of ruined crops and official callousness in Connemara on the Atlantic coast.

When the ranger launches a campaign of bloody vengeance against authority, the British draft one of his former comrades, played by Hugo Weaving, to track him down.

Jim Broadbent plays Lord Kilmichael, an aristocrat who exports grain despite corpses piling up in the countryside, and Stephen Rea plays a Gaelic/English translator. Freddie Fox, Barry Keoghan, Moe Dunford, and Sarah Greene also star.

“The famine is one of those essential Irish stories that we haven’t figured out a way to bring to the screen,” the director, Lance Daly, told the Guardian on Monday. “Doing it as a revenge thriller was a really smart way to smuggle the story of the great hunger to a wide audience which might not be first in line to watch a film about famine and suffering and the truly horrid history of the time.”

Daly, from Dublin, filmed the exteriors in Connemara and Wicklow and consulted historians on the details.

The famine, triggered by a blight in potato crops, ravaged Ireland from 1845 to 1849, a humanitarian catastrophe that flummoxed the British government even as Quakers, Native American Choctaws, the Ottoman empire and others sent assistance.

“It’s not just some story,” said Daly. “It’s a story that belongs to everyone. I felt a great responsibility to get the history right, to get the language right, and that didn’t make the British characters out to be villains and the Irish as innocent victims. The deeper you go, the more complex it gets.”

Channel 4 prompted indignation in 2015 when it commissioned a television comedy series titled Hungry from Hugh Travers, a Dublin-based writer. Some 40,000 people signed a petition condemning the project.

“Murder, genocide, people dying, retching with their faces green from eating weeds, their bowels hanging out of them – no passage of time will make that funny,” Tim Pat Coogan, a historian and author, said at the time. Channel 4 scrapped the series.