PORTLAND — A middle school principal who made racially prejudiced comments about newly elected city commissioners in June apologized Tuesday.

Robyn Bailey, a 23-year veteran of Portland Public Schools, sent a letter to the Lincoln Middle School community Tuesday.

“I owe many people an apology,” Bailey wrote. “I regret that my words were not more thoughtful and that I didn’t reach out personally to discuss my concerns.”

In an email sent to City Hall two days after the June 8 election, Bailey lashed out at newly elected progressives, singling out two women of color for “spreading hatred” and arguing that they’d be “done, gone and trashed” if they were white.

Bailey was promoted from assistant to interim principal of Lincoln Middle School in August.

In her Oct. 19 apology letter, Bailey lamented that she “undermined the success of those women” and that her comments worsened a political discourse she already saw as divisive.

“When I penned my email in June, it was intended to move beyond divisiveness to a position of collaboration; it was intended to facilitate communication, not to stunt it; it was intended to raise the level of dialogue, not to devolve further,” Bailey wrote.

She didn’t address the subject of race or her prior comments on it.

A letter from Superintendent Xavier Botana sent to Portland school district faculty said that she “expressed remorse” for her June comments and an understanding of how they “could be perceived as unchecked biases.”

Commissioner Shay Stewart Bouley, who was targeted in the June letter, said that she discussed the matter with Bailey in a private phone call last week.

“I asked her, ‘Why did you write that?’” Stewart Bouley said.

Bailey, who did not respond for comment, said the commissioner “shared with me the impact my words had on her and I listened.”

The two had met years ago when Stewart Bouley was invited to give a talk about race to students at Lincoln Middle School, according to Stewart Bouley, who runs Black Girl in Maine Media and is the executive director of the Boston-based anti-racism nonprofit Community Change, Inc.

Bailey defended her qualifications for the principal role, writing that she will not let that email in June define her.

“I will continue on my own educational journey, learning from my peers and my students and their families,” she wrote. “We are a strong community, and significantly stronger together than divided.”