A man fell on Jackson Avenue near Court Square, FDNY officials said. View Full Caption DNAinfo/Jeanmarie Evelly

LONG ISLAND CITY — A man dropped his keys into a sidewalk subway grate, opened it up and tried to climb down to get them when he slipped and fell 20 feet, seriously hurting himself Tuesday morning, officials said.

The man, whose name and age were not immediately released, dropped the keys into the grating outside 24-20 Jackson Ave., near Court Square, about 10:50 a.m., MTA and FDNY officials said.

The man initially tried to snatch the keys by dangling a string through the bars, but escalated his efforts when that failed, witnesses said.

"I saw him tinkering with the string," said Harold Blumenfeld, a building manager nearby.

"He had tools. I saw him with a crowbar. He must have lifted [the grate] up," Blumenfeld added.

The man dropped an A-frame ladder and climbed down to get his keys, but then slipped off, an MTA spokesman said.

Blumenfeld turned away and back again to see another man trying to console the man down at the bottom of the hole, urging him "to stay calm."

"I didn't see him climb into the hole, but the guy, somebody, was talking to him," Blumfeld said.

FDNY crews eventually pulled the man from the hole.

"He looked all right. He was bleeding a little bit, but he was conscious," Blumenfeld said.

@NYCityAlerts something happened at Jackson ave outside court square station. 6 fire trucks so far. pic.twitter.com/UhxqGavmPO — (1/53) (@Appleguysnake) June 2, 2015

He suffered serious injuries but was listed in stable condition at Bellevue Hospital, the FDNY added. The MTA said the man hurt his right leg.

The crews also removed a ladder from the hole, Blumenfeld said.

The grate wasn't damaged and has been re-secured, an MTA spokesman said.