For the first time in its 46-year history, a Tanzanian film is part of the official selection of the Toronto Film Festival, as Amil Shivji’s “Vuta N’Kuvute” (Tug of War) prepares to bow at the Canadian fest on Sept. 13.

Set in colonial-era Zanzibar, “Tug of War” is the story of a young freedom fighter and a runaway bride whose romance blossoms against the backdrop of a political uprising in the final years of British colonial rule.

The film is produced by Steven Markovitz (Big World Cinema) and Shivji, who co-wrote with South African director Jenna Bass, who also debuts her latest feature, “Mlungu Wam” (Good Madam), in Toronto’s Platform section.

Based on the Swahili novel by Shafi Adam Shafi, “Tug of War” is a story that captivated the director when he first laid his hands on it. “I picked it up and couldn’t put it down,” Shivji tells Variety. “I realized that this book was so cinematic. It was like I was watching a film through Shafi’s writing.”

The movie centers on Denge (Gudrun Columbus Mwanyika), a young revolutionary agitating for Zanzibari independence, and Yasmin (Ikhlas Gafur Vora), an Indian-Zanzibari woman who flees an arranged marriage in search of her own freedom. Forbidden love stirs between the two, even as the resistance struggle by Denge and his comrades intensifies and a growing crackdown by colonial authorities puts all their lives in jeopardy.

Shivji says “Tug of War” is the first period drama in the history of the nascent Tanzanian film industry. It explores a little-known chapter in the archipelago evocatively referred to as the “Spice Islands,” whose white-sand beaches and UNESCO World Heritage Stone Town — among the top tourist attractions on the continent — paint an image of an island idyll frozen in time.

With his second feature, the director says he hoped to push back against that conventional framing. “This whole town’s history removes the people completely from the narrative of what Zanzibar is, and the people are the biggest part of the culture. It’s ever growing, ever changing, and very progressive,” he says. “I just felt like this would really help fill a void of a history that we haven’t been taught in our schools.”

In the 1950s, as Africans across the continent began agitating for independence, Zanzibar witnessed an increasingly bloody struggle for democratic rule that would put an end to a sultanate that — backed by British colonial administrators — had ruled for 100 years.

“The 1950s was a great time [in Zanzibar]. It was a time where political debate was encouraged, and critical thinking was encouraged,” says Shivji. “There were 100 newspapers being published every day on an island of 300,000 people in four different languages. It was a hub for social and critical thought. But then it just broke down over a decade.”

Shivji was born in Dar es Salaam but traces his family’s roots to Zanzibar, which he visited often as a child. The island’s history has always had a grip on him. With the help of production designers Emilia Roux and Eliudi Dominic Mwanyika and costume designer Hawa Ally Issa, “Tug of War” evokes the fin de siècle character of a society on the verge of a violent disruption, as British administrators blithely wine and dine in expat social clubs and the plangent chords of taarab music echo through the narrow lanes of a Stone Town harshly segregated along arbitrary racial lines.

More than half a century after the bloody struggle that brought an end to colonial rule, those divisions persist in modern-day Zanzibar. “That inter-generational trauma continues to exist, and the memory has been very hard for people to process,” says Shivji. “I knew that one film is not going to solve these problems. But it was an opportunity to allow us to look at the ‘50s and realize that we actually aren’t that far away.”