A firefighter literally engulfed in flames was pulled to safety out of the third floor of a Brooklyn brownstone by a fellow firefighter this morning in a dramatic rescue that stunned witnesses.

He had been searching the empty apartment for trapped occupants when the whole third floor erupted shooting flames and shrapnel out the window.

The firefighter, from Rescue 2 in Crown Heights, was taken to Cornell University Medical Center in Manhattan with burns over 42 percent of his body, fire official said.

“It was crazy. It was ablaze. The firefighter was about to jump he was screaming like crazy,” said Victor Vargas, 25, works at neighboring deli El Cano. “We smelled the smoke and ran over.”

He added, “the firefighter on ladder started beating the fire [on him] with his hands.”

Video taken by a witness shows a firefighter slowly – but methodically — pulling a firefighter covered with flames out from the window onto a almost horizontal truck ladder some three stories in the air.

Red and orange flames can be seen shooting from the buildings as debris rained down below.

It too about an hour to bring the fire under control.

“One firefighter appeared at the window with heavy fire and he escaped down the ladder. He was the most seriously injured,” said Edward Baggott, an FDNY deputy assistant chief.

That firefighter was sedated, but breathing on his own in critical condition.

Another firefighter was also taken to Cornell in serious condition and two others had minor injuries

Investigators do not believe the fire is suspicious and the home was not occupied at the time.

The home is owned by city school teacher and her family.

“They are coping the best they can,” said June’s brother Leon Brewster. “I don’t know they can stay.”