Craig Higgs set fire to a barbecue, a bag of coals and other items in the communal stairwell of a property in Musselburgh, East Lothian, on 20 April 2022.
During the trial, the Crown played CCTV footage showing the 37-year-old accused in the area shortly before the fire began.
The footage captured him walking towards Bellfield Court at 8.26pm and leaving the area at 8.36pm.
The Scottish Fire and Rescue Service was called to the scene at 8.43pm, just seven minutes after Higgs was seen walking away.
His former partner and the young child were trapped inside the flat as the building filled with thick smoke, placing their lives at risk.
Firefighters wearing breathing apparatus used an enforcer and an axe to gain entry to the property and rescue them.
Several other residents were also unable to leave the building until crews brought the blaze under control.
Significant damage was caused to the communal stairwell and several flats within the building.
Higgs was arrested by police around three hours later and was found to be in possession of a lighter.
Witnesses also reported seeing a man matching his description near the scene.
Procurator Fiscal Sineidin Corrins, of the Crown Office and Procurator Fiscal Service (COPFS), said:
“Craig Higgs deliberately set a fire which left his former partner and a young child trapped inside their home and placed the lives of other residents in immediate danger.
“This was a calculated and deeply reckless act that put an entire community at risk and could easily have had fatal consequences.
“Domestic abuse takes many forms, but it is always harmful and can have devastating consequences for victims, their families and the wider community.
“Scotland’s prosecutors will continue to do everything we can to hold offenders accountable while supporting those affected through the prosecution process.
“No one should have to live in fear of a partner or former partner, and I would urge anyone affected by this type of offending to seek support.”
Higgs was found guilty of wilful fire-raising, endangering the lives of his former partner, a child and other residents.
He had earlier pleaded guilty to two charges of threatening or abusive behaviour on the first day of trial at the High Court in Edinburgh.
On 28 July 2026, at the High Court in Edinburgh, Higgs was sentenced to seven years imprisonment.
A non-harassment order banning him from contacting or attempting to contact the victims were also granted indefinitely.