NAIROBI, Kenya — The first Kenyan entry ever nominated for an award at the Cannes Film Festival will debut in France in two weeks — but it is now illegal for Kenyans back home to watch it.

The Kenya Film Classification Board on Friday banned the film, “Rafiki,” a drama about two Kenyan girls who fall in love. Ezekiel Mutua, the board’s chief executive officer, said the film “legitimizes homosexuality against the dominant values, cultures and beliefs of the people of Kenya.”

Mr. Mutua said the film board’s ruling did not represent a ban on homosexual content.

“Homosexuality is a reality,” he said. “What we are against is the endeavor to show that as a way of life in Kenya.”

In the film, directed, written and co-produced by Wanuri Kahiu, the girls are separated by their communities, which oppose their relationship.