Mysterious attacks break out across the island, leaving the victims disfigured and drenched in blood. The government and state media blame US-backed dissidents and assure the population the situation is under control.

But as the attacks spread, Juan, a fortysomething loafer in Havana, identifies the true culprit – a plague of zombies – and does what Cubans traditionally do in times of crisis: becomes a capitalist. He sets up a business, Juan of the Dead, and makes a quick profit ridding customers of infected loved ones by bashing, smashing and stomping out their brains.

Welcome to the world of Cuba's first feature-length horror film in half a century, a gore-filled black comedy which satirises social mores in the twilight of Castro rule.

"It makes observations about who we are," Alejandro Brugués, the director and writer, said. "A government which blames the US for everything. A people who are very passive. And then when confronted with a crisis we go into business."

Juan of the Dead, whose title echoes the British 2004 zombie film Shaun of the Dead, is in post-production and due to be released in Cuba and internationally at the end of summer.

One publicity poster features bloodied hands reaching for Havana's Capitol and a tagline that reads: "Fifty years after the Cuban revolution a new one is about to start."

The reported $2.7m (£1.6m) budget – much of it spent on heavily made-up monster hordes who chase the hero and his friends through Havana and into the ocean – makes it a blockbuster by Cuban standards. Most of the money came from Spanish backers but the state-run Cuban Institute of Cinematographic Industry and Arts (ICAIC) also chipped in.

Brugués, 34, who has made one previous feature, Personal Belongings, said he grew up adoring US zombie movies and it seemed natural to make one in a city worn down by scarcity and resignation. "I was walking through Havana one day and looked at the expressions on people's faces. Zombies. They didn't even need make-up."

Juan of the Dead is rooted in a contemporary Cuban setting, but is not a political satire about a communist state edging towards a market economy, said Inti Herrera, an executive producer. "Zombie films are typically in an Anglo-Saxon context and we wanted this one to be contextualised here in Havana."

The director and producer are both graduates of Cuba's International School of Film and Television. At 100 minutes, Juan of the Dead is believed to be Cuba's first feature-length horror movie since the 1959 revolution.

A handful of arthouse classics such as Death of a Bureaucrat were made in the 60s, and Strawberry and Chocolate, which dealt with gay rights, made an Oscar-nominated splash in 1994, but otherwise Cuban cinema has had limited international impact.

It remains to be seen whether its imminent gorefest will join Shaun of the Dead and Sam Raimi's 1981 The Evil Dead as a classic of its genre. Key scenes were shot on the Malecon seafront with tight camera angles to give the impression of a depopulated city. Municipal rubbish collectors who found a zombie head thought it was the real thing and summoned police.

The plot blends horror tropes with Cuban twists. Juan, played by Alexis Díaz de Villegas, in real life a stage director and drama professor, is a layabout loser who senses opportunity when flesh-eaters turn on friends and family. With the government paralysed, he sets up a lucrative service offering to eradicate infected loved ones "for a reasonable price".

He uses martial skills learned during Cuba's military intervention in Angola and recruits his daughter and sidekicks into the business. It echoes the plot of Ghostbusters, except the Havana crew uses catapults, baseball bats and other objects to pound zombies to a pulp.

In real life, Cubans are adept at finding opportunity in crisis. To supplement average state wages of $20 (£12) a month many have black market sidelines. Economic disasters such as the loss of Soviet Union subsidies in the 1990s, and the financial crunch since 2008, have fuelled commercial creativity.

Juan's enterprise founders, however, when zombies wipe out his client base and he must consider that other staple Cuban response to crisis: take to the sea and flee the island.