A Kenyan judge has lifted a ban on a film about a lesbian relationship - for a week.

Kenya's film classification board had imposed the ban on Rafiki in April for "promoting lesbianism".

But Judge Wilfrida Okwany decided to allow the screening of the film for seven days so that it could be submitted for the Oscars.

Homosexuality is illegal in Kenya - a legacy of British colonial-era rule in the country.

Rafiki, which means "friend" in Swahili, traces a coming-of-age love story between two young women, who meet and fall in love.

Their romance unfolds against a backdrop of homophobia and intolerance in a country where sex between people of the same gender is outlawed.

The film was the first from Kenya to debut at the Cannes Film Festival in May.

But it had been banned in Kenya a month earlier due to its lesbian storyline, as Kenya's Film Classification Board said it "sought to legitimise lesbian romance".

In order to be submitted to the Academy Awards, the film must have been publicly exhibited for at least seven consecutive days at a commercial motion picture venue.

In her ruling on Friday, Ms Okwany gave permission for the film to be shown to "willing adults".

She said she was "not convinced that Kenya is such a weak society that its moral foundation will be shaken by seeing such a film".

But the head of the Kenya Film Classification Board, Ezekiel Mutua, was unhappy about the decision, saying "homosexuality is not our way of life".

The film's director Wanuri Kahiu, who appealed against the ban, was overjoyed with the latest decision.

The film's Twitter account announced that it will hold screenings in the Kenyan capital, Nairobi.