Sources tell The Post that Davuluri allegedly made the comments in her hotel room after she was crowned Miss New York on July 16 on Staten Island.

In a scene straight out of “Miss Congeniality,” unfortunately for Davuluri — who nicknamed herself “Miss Diversity” — a fellow beauty queen was in the next room and recorded the comments, along with other allegedly offensive remarks made by others.

A source tells The Post: “Davuluri invited friends back to her hotel room after her win. A girl in the next room overheard their conversation, and was so offended she decided to tape part of it. A friend of Davuluri was supposedly heard making racist remarks, and Davuluri is allegedly heard on the tape blasting Miss America, ‘Mallory’s fat as [bleep].’"

A new Miss America will be crowned at the pageant in Atlantic City on live TV this Sunday night, with Hagan present.

More On This...

Following complaints to pageant organizers, Davuluri sent a message on Facebook to Hagan saying, “I want to apologize for the awful statements made by people in my room . . . There were people who claimed to be my supporters and said things I never agreed with, nor supported . . . I was never a part of the words or statements that may have been hurtful . . . I’m sorry if someone said something that was inappropriate.”

A rep for Miss America said, “The situation was investigated fully back in July and there is no validity to the story whatsoever. Miss New York spoke to Mallory Hagan to let her know there was no validity and to apologize if she was offended in any way.”