KENNEBUNK — A 25-year-old Maryland man died in a house fire in Kennebunk early Monday, but his brother escaped from a second-floor window and rescued their father from the first floor.

All three men were sleeping when the fire started around 2 a.m. at 305 Cat Mousam Road. There were no smoke detectors in the house, the State Fire Marshal’s Office said.

The man who died was Kyle Szlosek of Glen Burnie, Maryland, according to Stephen McCausland, spokesman for the Maine Department of Public Safety. Szlosek and his half brother, Jonathan Cressey, 31, of Suffolk, Virginia, were staying at the Kennebunk house while they visited their mother, who is in the hospital for an unrelated reason.

Paul Szlosek, 62, who lived in the two-story Cape Cod-style house built in 1875, was being treated at Maine Medical Center in Portland for smoke inhalation, McCausland said.

Cressey told investigators he had been asleep on the second floor when the fire broke out and he was awakened by the family cat making noise. Because of all the smoke and flames inside the house, he climbed out a dormer window and onto a porch roof, according to the fire marshal’s office, which investigated the blaze.

Cressey saw his brother, who had been sleeping in a bedroom on the opposite side of the house, in one of the windows and tried unsuccessfully to find a ladder to help him escape. Then he heard his father calling for help from the first floor where he had been sleeping, the fire marshal’s office said.

Cressey pulled his father to safety through a bedroom window. By then, the building was burning and he could not get back inside.

By the time Kennebunk firefighters arrived, there were heavy flames coming from the first and second floors on the right side of the house, and heavy smoke from the left side, said Fire Chief Jeff Rowe.

Firefighters tried to get through the second-floor window using a ladder, but the intense smoke and flames drove them back, he said. They attacked the fire from the front of the house, aided by firefighters from Wells, Arundel, Sanford and Biddeford. They found Kyle Szlosek’s body after they finally got inside and upstairs.

One firefighter injured a shoulder while pulling material from the ceiling looking for hot spots, Rowe said.

Paul Szlosek, who was initially reported to have critical injuries, was stabilized at Southern Maine Health Care in Biddeford. He was then transferred to Maine Medical Center.

“By the time the one who escaped woke up, the fire was too well involved to help anyone else,” said Sgt. Joel Davis of the fire marshal’s office.

The fire started in the living room on the first floor and was either the result of a malfunctioning computer or improperly discarded smoking materials, the fire marshal’s office said.

Deborah Morrissey, who was visiting her mother in the house across the street, said Cressey arrived at her mother’s door around 2 a.m. with no shoes, soot covering his face, and frantically asked them to call the fire department. As they stepped onto the porch, they could see flames billowing from the house.

“It was unbelievable,” said Deborah Morrissey’s daughter Meaghan. “It was glowing.”

“Flames were shooting out the side windows,” her mother said.

Cressey told them he had dragged his stepfather through a window and left him lying on their lawn. Deborah Morrissey, who is a nurse manager at Brigham and Women’s South Shore Hospital in South Weymouth, Massachusetts, tended to the older man until rescue workers arrived. Cressey wanted to go back into the house after his brother but the flames were too intense, she said.

She was standing with Cressey when firefighters notified him they had found his brother’s body.

“I’m moved to tears,” she said. “You felt really helpless.”

Cressey was at the house Monday morning after the fire, but declined to speak to reporters. He was still wearing the shirt and jacket that Deborah Morrissey had given him early that morning. Everything else he had with him, including his cellphone and car keys, was destroyed in the fire, she said.

A friend of the Szlosek family has set up a GoFundMe site – gofundme.com/szlosekfamily – that had raised $925 as of Monday night.