A brief appearance in a rap music video almost cost a school principal in New York, her job.

Assistant principal of Southampton High School, New York Esther Adler-O’Keefe appeared on the music video ‘Best Friend’ featuring rapper J.R. and R&B singer Trey Songz, reported The Hollywood Reporter.

In the music video, Adler-O’Keefe played the minor role of a wife, who – along with her husband – left the house and for a party to break out soon after.

The video featured bikini-clad women with constant use of profanity in its lyrics.

However, the school district was not pleased with the video and reassigned the principal to another school within the same district.

"It has recently come to our attention that a member of our administrative staff appeared in a music video. The video in question showcases behaviors and language use that is not promoted by the Southampton School District.

"In fact, we actively teach our students the importance of good character and making smart choices. Additionally, this is not representative of who we are as a district nor of our students and staff,” said superintendent Scott Farina in an email to parents.

The entertainment website also said the video which was made available on YouTube last month has since garnered 1.4 million views.