A construction worker on the Second Avenue subway project who became stuck in mud up to his waist in a 75-foot-deep tunnel on Tuesday night was freed early Wednesday morning in a four-hour rescue involving more than 100 emergency workers, the authorities said.

It was not immediately clear exactly how the worker, who was not identified, became stuck or what his condition was when he was rescued about 12:30 a.m. He was conscious and was being taken to a hospital, likely with hypothermia, officials said.

He was lifted from the hole in a yellow basket suspended from a crane on the surface. When he emerged, he was swaddled in white blankets and rushed on a gurney to a waiting ambulance amid throngs of rescue workers and news photographers.

The episode, which was reported about 8:30 p.m. Tuesday, occurred at a construction site on Second Avenue near 95th Street. Ron Spadafora, an assistant fire chief, said the worker somehow lodged his foot in a frame used in the construction and sank into the mud.