BIDDEFORD — The Biddeford fire that killed a man Tuesday was a suicide, according to investigators.

The State Fire Marshal’s Office says Ricardo Santiesteban had been drinking 40-ounce beers most of the day and poured gasoline around his bedroom and then ignited it and himself.

Santiesteban, 49, had a friend deliver what turned out to be a suicide note to his wife who was in a nearby apartment at the time, authorities said.

The couple had had a fight over the weekend, said Department of Public Safety spokesman Stephen McCausland.

In addition to killing Santiesteban, the Main Street fire displaced many residents and destroyed all their belongings and sent at least one resident and two firefighters to the hospital.

McCausland said it’s fortunate there were not more people killed.

“The building is pretty much destroyed and there are nine people left homeless,” McCausland said. He added that Santiesteban’s wife, Gail Rydle, also has been left homeless.

One of the fire marshal arson dogs helped investigators determine that gasoline had been poured in the first-floor apartment. Santiesteban had apparently purchased the gasoline that afternoon.

The fire broke out at 5:30 p.m. and firefighters from Biddeford and surrounding communities responded. Main Street was shut down for several hours.

When firefighters arrived, they encountered heavy smoke coming from the rear of the building.

Investigators spent most of the night examining the four-story building at 29 Main St., looking for clues to determine what started the fire.

The American Red Cross is working to find temporary housing for the displaced residents.

An autopsy on Santiesteban’s body will be performed by the State Medical Examiner in Augusta.