A man fell to his death as he attempted to escape through a fourth-storey window after he was allegedly caught molesting a six-year-old boy.

Edgar Collaguazo, 44, had been locked in a bedroom in his New York flat by the boy's parents, who said they caught him abusing their son at the child's birthday party.

He is thought to have clambered out of the top-floor window and jumped to escape before police arrived.

Video footage obtained by the New York Daily News shows him plunging 40 feet (12 metres) and landing on a metal fence outside the flat in the Jackson Heights neighbourhood in Queens.

“If he didn’t have a filthy mind, [he’d] simply stay and face the situation,” the mother of the alleged victim told the newspaper.

Collaguazo was said to have invited three children - including the boy and his five-year-old female cousin - into his room to watch a film during the party.

At one point the girl left the room "acting strangely", it was reported. Her mother later looked into Collaguazo's room and saw him molesting the boy.

“She came to me frightened and crying,” the boy’s mother said. “We never thought the man had a mind this dirty.”

Fathers of children attending the party reportedly began beating up Collaguazo before the victim's mother intervened.

“I told them, ‘Stop beating him, already! I have called the police,’” she said.

They locked Collaguazo in the room to await police but found him gone when they opened the door. He was discovered slumped on the ground outside.

“The guy had one foot on the ledge trying to climb over the bars,” said witness Jose Valentine, who was leaving a nearby house at the time. “He let himself go head first and landed with a thud and splatter."

Collaguazo was rushed to hospital but could not be saved.