Actress Ellie Kemper has apologised for taking part in a debutante ball as a teenager, saying the event had an “unquestionably racist, sexist and elitist past”.

Kemper, best known for her work on TV series Unbreakable Kimmy Schmidt, was 19 when she appeared at the Veiled Prophet Ball in St Louis, Missouri, in 1999.

The 41-year-old found herself at the centre of a viral Twitter debate over the ball, where she was reportedly crowned “Queen of Love and Beauty”.

According to The Atlantic magazine, the event was founded in 1878 by wealthy white elites and barred black and Jewish people from taking part.

Kemper shared a lengthy apology on Instagram and said while she was unaware of the ball’s history, “ignorance is no excuse”.

She wrote: “When I was 19 years old, I decided to participate in a debutante ball in my hometown. The century-old organisation that hosted the debutante ball had an unquestionably racist, sexist and elitist past.

“I was not aware of this history at the time, but ignorance is no excuse. I was old enough to have educated myself before getting involved. I unequivocally deplore, denounce, and reject white supremacy.

“At the same time, I acknowledge that because of my race and my privilege, I am the beneficiary of a system that has dispensed unequal justice and unequal rewards.”

Kemper, who as well as playing the lead role in sitcom Unbreakable Kimmy Schmidt portrayed Erin Hannon in the US version of The Office, said she realised last week she needed to apologise.

She said: “I believe strongly in the values of kindness, integrity, and inclusiveness.

“I try to live my life in accordance with these values. If my experience is an indication that organisations and institutions with pasts that fall short of these beliefs should be held to account, then I have to see this experience in a positive light.

“I want to apologise to the people I’ve disappointed, and I promise that moving forward I will listen, continue to educate myself, and use my privilege in support of the better society I think we’re capable of becoming.”

Twitter user @WB_Baskerville, who sparked the debate over the ball with a tweet late last month, responded to Kemper’s apology on Monday.

They posted: “I have made the decision to accept Ellie’s apology. Everyone leave her alone now.”