As thick black smoke filled the two-story house early Wednesday, Smithtown firefighters searched for survivors.

On the floor of an upstairs bathroom, they found two: a mother and her 3-month-old son, both overcome by the smoke.

For one of the firefighters, Jenn O’Brien, it was a stunning moment.

She and another firefighter helped deliver Kristen Sidik’s baby in the same bathroom just three months ago. On Wednesday, O’Brien helped carry them to safety.

“Jenn had the opportunity to assist the family on one of the best days of their lives,” said Jeff Bressler, a Smithtown Fire Department spokesman. “It’s ironic that . . . Jenn had to return to that exact scene and had to confront one of the worst days of the family’s life.”

Bressler said the department’s first call went out shortly after 3 a.m. as an automatic smoke-detector alarm.

advertisement | advertise on newsday

Third Assistant Chief Patrick Diecidue and two firefighters were the first to arrive. Diecidue saw the heavy smoke and immediately called dispatch to report a house fire, Bressler said.

The three firefighters entered the home on Sterling Lane and were able to rescue Sidik’s 3-year-old daughter, Bressler said.

Minutes later, a second search team including O’Brien found Sidik and the baby in the bathroom, Bressler said.

Jennifer Stolz, a neighbor, said she watched as a firefighter broke down the front door and ran into the house without any special equipment.

Firefighters rescued a woman and her two children from a house fire on Sterling Lane in Smithtown early Wednesday, Aug. 24, 2016. Photo Credit: Stringer News Service

“He came out choking and gagging, carrying one of the babies,” she said.

Firefighters performed CPR on Sidik and her children on the front lawn, Stolz said.

“They were true heroes,” she said.

O’Brien, a recovery room nurse at Stony Brook University Hospital and former Smithtown fire captain, couldn’t be reached for comment.

“I think she was emotionally drained because of the special attachment she had developed with that family,” Bressler said.

Late Wednesday, Sidik was in critical condition at Stony Brook University Hospital; the children remained in serious condition at Stony Brook Children’s Hospital, officials said.

advertisement | advertise on newsday

Thomas Sidik was at his wife’s bedside, a hospital spokesman said. A captain in the Hauppauge fire department, he was not home at the time of the fire.

Sidik was on reserve duty with the U.S. Coast Guard in Fort Dix, in New Jersey, and “got back here as soon as he could,” Bressler said.

Firefighters from Hauppauge, Kings Park, St. James and Nesconset also responded to the blaze, which was knocked down in about an hour.

Two family dogs died as a result of the fire, Bressler said.

The cause and origin of the blaze is being investigated by the Smithtown fire marshal’s office.

advertisement | advertise on newsday

Calling Kristen Sidik a survivor, Stolz recalled how the mother had been involved in a serious crash with her daughter in which their car rolled over. Then, on May 22, she gave birth to her second child at home in an emergency.

“She’s a very strong woman,” the neighbor said.

With Kevin Deutsch and Gary Dymski