A 20-year-old man fell to his death as he and a friend tried to take photos of the skyline from a catwalk above the roof of the Four Seasons Hotel in Midtown Manhattan on Wednesday night, the authorities said.

The man, Connor Cummings of Rockaway, N.J., and his friend took the elevator to the top floor of the 52-story hotel, and then climbed up several flights of stairs onto the roof. There they gained access to a fenced-off area that contained cooling equipment and fans surrounded by ladders leading to metal catwalks.

After clambering up a 25-foot ladder to the catwalk area, the pair began taking photos using hand-held cameras, police officials said. Around 11:15 p.m., as rain was falling over Manhattan, Mr. Cummings stepped back and fell through an opening in the floor of the catwalk, where the ladder joined with the landing.

His friend, 18, told investigators he heard a bang and found Mr. Cummings’s body on the roof 25 feet below the catwalk.