North Yorkshire Fire and Rescue Service were called out just after 1.30pm on March 7 to a farm near Bramham.
After putting the fire out, they discovered the cause of the fire was a battery-powered pedometer - used to prove the pig is free-range - which had been eaten by the other pigs.
The service tweeted: "13:37 Should be an oink not a tweet. Tadcaster and Knaresbororough firecrews attended a fire to 4 pigpens near Bramham. No pigs harmed. Cause of fire attributed to a battery powered pedometer carried by one of the pigs (to prove it was free-range), which was eaten by the other pigs.
"After nature had taken its course, it's believed that the copper from the batteries reacted with the pigpens contents and in conjunction with dry bedding, ignited burning approx. 75sqm of hay. A hosereel was used to extinguish the fire and save the bacon."