Kenya has banned its first feature film to premiere at the Cannes Film Festival, accusing it of having "clear intent to promote lesbianism in Kenya contrary to the law".
Director Wanuri Kahiu said she was "incredibly sorry" to confirm the ban of Rafiki, or "Friend" in Swahili, by the Kenya Film Classification Board. Her film depicts a love story between two women.
In Kenya, gay sex attracts a prison sentence of up to 14 years. Many countries across Africa have laws against homosexuality, with people facing severe harassment and physical threats.
"We believe adult Kenyans are mature and discerning enough to watch local content but their right has been denied," Ms Kahiu said on Twitter.
The director has said in interviews she had been nervous about the film's reception in Kenya but found support from government authorities and the local film industry.
But on Friday, the film board accused producers of changing the original script that was licensed for production and said it "shall pursue the legal means to hold them accountable". The original script did not have romantic scenes between the female actors, the board said.
"It is our considered view that the moral of the story in this film is to legitimise lesbianism in Kenya," the board's statement said.
The board said it met the director earlier this month and asked her to edit out the film's "offensive" parts. On Wednesday, she told the board to go ahead and make a ruling, it said.
Kenyan gay rights activists quickly raised an outcry, while the Cannes festival shared Ms Kahiu's comments on Twitter. Rafiki debuts at the festival next month.
The film's ban comes as Kenya's High Court has begun hearing arguments in a case that challenges parts of the penal code seen as targeting the LGBT community.
The National Gay and Lesbian Human Rights Commission argues that the sections are in breach of the constitution and deny basic rights by criminalising consensual same-sex relations between adults.
The court on Monday is expected to announce a date for its ruling.