About 30 firefighters tackled the blaze at a farm near to Maerdy Lane, Arddleen.
The blaze started shortly after 1am yesterday and the crews did not leave the scene, close to the A483, until 7pm. They used water from a nearby canal to help them tackle the fire.
Two barns were destroyed in the fire and a third building was badly damaged.
A spokesman for Mid and West Wales Fire Service said no one was injured and the cause of the fire was not yet known.
He said: "Three barns were involved in the fire. One measuring 40 metres by 40 metres was totally destroyed.
"One barn measuring 30 metres by 40 metres was totally destroyed and one measuring 30 metres by 50 metres was 50 per cent destroyed by the fire.
"The barns contained hay, straw and farm machinery.
"The cause of the fire is not yet known and investigations are still taking place."
Crews from Llanfyllin, Montgomery, Llanfair Caereinion and two from Welshpool were sent to the blaze. They pumped water from the nearby Shropshire Union Canal to damp down the hay and straw.