An Oakley family of three had a lucky escape after vandals set fire to the house next door at the weekend.
The flames quickly caught hold and police said the consequences could have been disastrous.
Several youths were seen in the area of the vacant property at 17 Thorn Tree Place in the west Fife village.
Police confirmed they were treating the fire as suspicious and appealed for help in tracking down those responsible.
The drama began soon after 1.30am on Sunday when residents smelled smoke coming from the property.
The family living immediately next door, who have not been named by the police, somehow managed to scramble to safety.
It is understood a mother and her two grown-up children, a son and a daughter, lived in the adjoining property at the end of the cul-de-sac.
Emergency services were called and two crews from Dunfermline were soon at the scene, as were the police, who evacuated neighbouring homes as firefighters tackled the fire that had engulfed the vacant house.
A third crew from Dunfermline was sent for and at one stage the firefighters ran out of water.
They also had to abandon the building as the roof was in danger of collapsing as it eventually did.
It took them until shortly before 6am to put the fire out, although they remained at the scene for much of Sunday damping down hot spots.
Part of the roof of the house next door was also damaged and the family have moved out of their home for the time being.
Police kept a watch on the property where the fire started.Doss houseNeighbours said it was used as a “doss house”.
Jamie Doctor, who lives in the street, told The Courier the first he knew of the fire was when the police arrived at his front door.
The Lothians bus driver said, “I was on back shift and had been asleep for about an hour. When we looked out of the window it was like fog, I thought it was fog.
“The police said they would be happier if we got out of the house, because they didn’t know if next door was going to go up.”
He added, “The flames were going right through the roof for a couple of hours, the fire brigade were really struggling to contain it.
“The next thing the roof came down.”
Mr Doctor said No 17 had been vacant for about three years.
It was occupied by an elderly couple and their son, but he moved away from the village after his parents passed away.
“I feel really sorry for the family that was next door,” he added.
“They’ll not go back in there, they don’t want to go back.
“The house next door to them used to be privately owned, but when his mother died the boy moved away.
“He said there was nothing left here for him.
“It’s been empty since then and has been used as a doss house.
“It’s caused us a lot of grief.”
Detective Constable David Bellingham said, “The circumstances of the fire are suspicious and a number of people were seen to have been in the area of the house at the material time.
“This is not just a building fire, the consequences for any sleeping neighbours, had it not been discovered in time, could have been disastrous.”