CAPE TOWN — When the sound of gunshots rattled the calm in the Cape Flats district of Cape Town on a recent weekday afternoon, nobody panicked. Some residents were too busy snapping cellphone pictures of Orlando Bloom. Others waved from their windows and balconies, hoping to catch the eye of Forest Whitaker, who flashed them a thumbs-up.

The shots — which were blanks — might have been commonplace in this notoriously rough township. But the sight of two film stars was anything but.

As production wrapped in December on “Zulu” — an adaptation of the crime thriller by the French novelist Caryl Ferey — hopes were high that this latest star sighting in Cape Town wouldn’t be the last.

One year after the release of Universal’s “Safe House” and Fox’s “Chronicle,” both lensed in South Africa, Pathe Intl. is gambling on this country’s rising location status with two big co-productions of its own. “Zulu,” produced by Eskwad with Pathe, M6 Films, and South Africa’s Lobster Tree, marks the French company’s first venture into the territory. It sets the stage for the long-awaited Nelson Mandela biopic “Long Walk to Freedom,” which Pathe will be releasing with Anant Singh’s Videovision later this year.

The latest films are part of a noticeable trend. After years of serving as a scenic stand-in for other countries, South Africa is enjoying its own turn in the spotlight. Lobster Tree’s Eric Loeb says more and more producers are looking to mine the country’s rich cultural heritage for new stories to tell.

“The more you dig, the more you find,” he says.

On the surface, “Zulu” is a modern-day crime thriller about a drug-trafficking syndicate in Cape Town. Whitaker plays a police chief who narrowly escaped death as a child in the apartheid era, when his family was caught in the crossfire between rival liberation movements. Bloom’s character is a freewheeling cop estranged from his ex-wife and son who is equally tormented by the past.

Haunting the movie are the ghosts of apartheid, and the difficult questions of justice and redemption being asked of a nation that, nearly two decades after its demise, is still grappling with its legacy.

Helmer Jerome Salle admits he was nervous about making the film, even wondering if Pathe would greenlight the project. After completing the script, he needed reassurance that the company was prepared to make such a dark movie, asking, “Are you sure you want to do it?”

The company agreed, largely because the film’s central theme, says Salle, would resonate with global audiences. “Forgiveness … is very universal,” he says.

The shoot wasn’t without its challenges. The Cape Flats township is notorious for its gang culture; while scouting locations, producers almost found themselves in the middle of a turf war. The location they settled on was relatively peaceful. “At least it was only run by one gang,” Loeb jokes.

The production, he says, highlighted South Africa’s strengths concerning offshore shoots, with its skilled crews, varied locations, and a pro-industry government that has introduced a host of incentives in recent years.

The movie is likely to strengthen the ties between France and South Africa, which signed a co-production treaty in 2010. The first official co-production between the two, “Skoonheid,” by South African helmer Oliver Hermanus, preemed in Un Certain Regard at Cannes in 2011.

Pathe is handling international sales for “Zulu,” and will be showing exclusive promo reel footage in Berlin.