This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

Please enable Javascript to watch this video

SAN BERNARDINO (KTLA)-

Two young children were killed and their father critically injured when a fire broke out in their apartment. Meanwhile, their mother was at the hospital in labor.

Thursday morning, firefighters were called to the San Bernardino home with smoke billowing out. The fire captain said crews heard screams coming from inside the apartment.

Entrances to the home were blocked, causing problems for firefighters.

The father was rescued from the burning home, and was rushed to the hospital with critical injuries.

Firefighters found the two children, ages 2 and 6, unconscious behind a couch.

"It's a good possibility that they hid behind the couch because of the fire, because they were afraid," San Bernardino City Fire Department Captain Rodd Mascis said. "And ultimately it could have led to their injuries and to their death."

Their mother was taken to the hospital Wednesday night in labor. By Thursday afternoon, officials said she hadn't had her baby yet and they had not told her about the deaths of her older children.

Officials later said the building was illegally occupied, and had been boarded up to stop people from living inside. The owner of the building had been fined in the past, and the family repeatedly ordered to leave.

The apartment did not have a smoke detector, and the utilities were illegally hooked up to the second-story unit, according to police.

The cause of the fire is unknown at this time.