An actor playing a gay character in a stage production of The Color Purple has been sacked over homophobic comments she made five years ago.

Oluwaseyi Omooba, who was due to play the lead role of Celie, claimed the Bible made clear homosexuality was wrong in the eyes of God and that people cannot be born gay. A row was sparked when her Facebook post was unearthed and shared online by a fellow actor last week.

On Thursday, the producers confirmed she would no longer be appearing in the show, saying Omooba’s comments had caused “significant and widely expressed concerns”.

Chris Stafford and Nikolai Foster, representing the Curve theatre in Leicester and the Birmingham Hippodrome, where the musical was due to be staged, said: “Following careful reflection, it has been decided that Seyi will no longer be involved with the production.

“The audition process, as ever, was conducted professionally and rigorously, led by an exceptional casting director with actors who are evaluated on what they present in the audition room. We do not operate a social media screening process in the casting of actors.”

Posting a screenshot of the Facebook post online last week, Aaron Lee Lambert – who is appearing in the London production of Hamilton – accused Omooba of hypocrisy. “Seeing as you’ve now been announced to be playing an LGBTQ character, I think you owe your LGBTQ peers an explanation. Immediately,” he wrote.

Other actors criticised Omooba, including the performer Charlotte Yorke, who said Omooba’s “antiquated views are wrong, not my sexuality. She doesn’t get to ‘believe’ in me ... I exist, I’m gay, and I feel and am more right than ever.”

The post on Omooba’s Facebook page read: “I do not believe you can be born gay and I do not believe homosexuality is right, though the law of this land has made it legal doesn’t mean it’s right.”

The musical production of The Color Purple, an adaptation of the Pulitzer prize-winning novel that was later turned into film starring Whoopi Goldberg, is due to be staged at the two theatres in July. It follows the life of its “tormented heroine”, Celie, over the course of 40 years.

A representative of Omooba has not responded to a request for comment.