More than 70 firefighters and 12 fire appliances were tasked to tackle a hay shed fire at a farm on the Ballybogey Road outside Ballymoney on Sunday afternoon.
The fire broke out just before midday and firefighters from around north Antrim and County Londonderry were sent to the farm.
A spokesman for the Northern Ireland Fire and Rescue Service said that the hay shed fire presented a number of risks including the presence of livestock, 1,000 bales of hay, fertiliser and 600 gallons of tractor diesel.
During the operation, the Ballybogey Road was closed to traffic and diversions put in place.
Mechanical equipment was required to separate the huge mounds of burning hay from unburnt hay and then lift the tonnes of material away from the source of the fire.
The NIFRS spokesman said that the fire was brought under control at around 2.30pm but the entire operation continued into the evening until around 8pm.
The cause of the fire was accidental, said the spokesman. It is believed that it started as a result of work being carried out using an angle grinder in the shed.
NIFRS added: “Our advice is to be careful when using machinery or tools in sheds and make sure you are working in a safe, non-flammable area. Be ready with firefighting media in the area but don’t put yourself in danger. Call the Fire Service and we will deal with it.”