JACKMAN — A 5-year-old boy was killed early Tuesday when a tractor-trailer truck crashed near his home and spilled a full load of logs through the first floor.

The boy, Liam Mahaney, would have started kindergarten in the fall. Rescue workers said he was likely killed instantly as he lay sleeping on the downstairs couch.

The truck driver, Christian Cloutier, 57, of Quebec, said he fell asleep at the wheel as he was driving south on U.S. Route 201, according to Detective Lt. Carl Gottardi, with the Somerset County Sheriff’s Office.

“It’s devastating to a small, close-knit community like Jackman,” Town Manager Kathy MacKenzie said. “This is what you see on TV other places. You don’t expect to see an accident that horrific in your town. It’s just a real cruel twist of fate. There were so many other ways the logs could have shifted.”

The approximately 100,000-pound truck crashed through two telephone poles and flipped on its side next to the house at 510 Main St., Gottardi said. The 2011 Peterbilt truck is owned by DAN Express in Quebec.

The home is owned by the boy’s father, Gary Mahaney, a U.S. Border Patrol agent. The tree-length logs spilled through the wall of the home, demolishing the downstairs and causing the second story to collapse. The home is destroyed, Gottardi said, and will be torn down.

At the time of the crash, around 2:30 a.m., one adult and two children were on the first floor, and another adult and two children were on the second floor, Gottardi said. He declined to identify the mother, the children or give their ages.

All of the surviving family members were taken to Jackman Region Health Center with minor injuries and later released, except for the mother. She was taken to Redington-Fairview General Hospital in Skowhegan, reportedly with a broken pelvis, said Shelbe Fuller, a public affairs specialist with U.S. Customs and Border Protection.

The driver was taken from Jackman Regional Health Center to Eastern Maine Medical Center in Bangor with non-life-threatening injuries, Gottardi said. The truck sustained heavy damage and was impounded for further inspection.

When Jackman-Moose River Fire Chief Bill Jarvis first pulled up to the scene, Border Patrol agents had already arrived and were searching for people in the home, he said. Two utility poles were broken, and wires were in the street. The mother and one child were sitting outside. The father, Gary Mahaney said, “Get a ladder, there are still three kids in the house,” Jarvis recalled.

Two Border Patrol agents managed to carry two children out, and Mahaney said one was still inside, on the couch downstairs, Jarvis said.

“As soon as he said that, oh, that was the worst feeling,” Jarvis said.

It took rescue workers about two hours to find Liam Mahaney and about seven hours to remove him from the home, officials said. They inflated special bags to move the logs.

“I’ve seen bad accidents, but I’ve never seen one in a building,” Jarvis said. “This one’s a child. This is pretty traumatic.”

The crash sheared the valves of a propane tank, causing a leak. With the possibility of sparks from downed wires, Jarvis said he ordered the electricity cut. Both lanes of U.S. Route 201 were closed until daylight.

The entire town lost power for several hours and a mile and a half of the central part of town, including several stores, went without power for more than 12 hours.

Crews clearing the debris were still at the scene at 6 p.m., hampered by the risk of the house falling on them, said Deputy Michael Ross, with the sheriff’s office.

Alan Duplessis lives across from the Mahaney family, and when he saw sparks outside, he initially thought his house had been struck by lightning. He later realized the sparks came from a transformer when the truck knocked down the utility poles.

He ran across the road at the same time the Border Patrol agents arrived, he said, and his wife, Anne, stayed with the Mahaney family’s children.

Anne Duplessis, a first-grade teacher at Forest Hills Consolidated School in Jackman, said she was “amazed at how strong they were,” referring to the family. The father, running around barefoot, never gave up looking for his son, she said.

Alan Duplessis said the crash will likely make the community stronger. “Every time we have one of these events, we rally out of it,” he said.

Celine Cloutier said she has lived in Jackman for 34 years and has never seen such a bad crash in the populated area of town. She was one of many residents who came to the scene to watch rescue crews.

“It’s been a long and tiring day, and I hope nothing like this happens again for a long time,” said firefighter Darryl Griffin, of Jackman.

Denise Plante, principal and assistant superintendent at Forest Hills Consolidated School, said she has alerted teachers and staff about the accident.

“Like the rest of this small community, they’re rallying around the needs of the family and wanting to know what they can do to help,” she said.

Fuller, with U.S. Customs and Border Protection, said border patrol agents would be helping the family however they could.

“It’s more than just a colleague. We’re a very close-knit family, if you will,” she said.

The crash will be reviewed by the Somerset County District Attorney’s Office to determine whether any charges will be filed, Gottardi said. It appears that speed was a factor in the crash, “but the extent of such will not be known until the entire investigation is completed,” he said.

The family was not available for comment.