Preventative action was taken after fire broke out in a stable at Burnmouth Farm in Maybole, South Ayrshire.
The farmer and his family were moved to safety.
One woman was taken by ambulance to Crosshouse Hospital, Kilmarnock, suffering from smoke inhalation but is thought to have been discharged following treatment.
Thirty firemen tackled the blaze, which was spotted around 10pm last night.
It took them an hour to get the fire under control after high winds hampered operations and fanned the flames towards the farmhouse.
At the height of the incident the stable roof and walls collapsed.
Commander Richard Duncan today told how a 30ft high "wall of water" was formed successfully to protect the farmhouse.
He paid tribute to the firefighters, saying: "Ten of the crew were part-timers and because of the rural setting they had to supplement water supplies from a nearby stream or river.
"They really did do a cracking job to prevent the fire spreading to the farmhouse."
Crews were called out from Dalmellington, Ayr, Kilmarnock and Dreghorn to assist firemen from Maybole.
Firefighters were still at the farm more than 12 hours later where they were involved in damping-down operations.
It's not known how the fire, which is known to have killed at least one farm animal, started.
A Strathclyde Police spokeswoman today said an investigation into the cause of the blaze was ongoing.