A Queens man was accused of molesting two kids at a children’s birthday party — and then wound up dead on the pavement hours later.

Edgar Collaguazo, 44, plunged to his death from a fourth-floor apartment inside a building on 95th Street in Jackson Heights early Thursday, police said.

He sublets a room in his unit to the 5-year-old birthday boy’s family, and had offered to let the child and a young girl watch a movie in his room while the adults partied, police and the family said.

But when one child’s mom went to check on them around midnight, she found Collaguazo with his hand down the boy’s pants. The girl later claimed the man had kissed her on the mouth.

Some of the adults began hitting Collaguazo. Then they locked the accused perv in his room and called the cops.

Collaguazo tried to flee out a window — and landed directly on a metal fence, before bouncing onto the ground, grisly security footage from the street level shows.

Police arrived moments later. EMS rushed him to the hospital in critical condition, and he later died, officials said.

The boy’s furious mom said Collaguazo and her son were very close, but she wasn’t aware of him touching the child in the past.

“I never imagined he was able to do something like that,” she told The Post.