I know this is an old thread but I will butt back in. I have seen lots of fire/explosions, but only know of two that were directly attributable to the battery being too close to a fuel tank.
The first was a battery next to a metal tank and the fool did not secure the battery down. It tipped over and made contact (in fact it welded itself to the tank) and the boat blew. Very Messy, but if the battery had been secured, and there had been rubber boots on the lugs, it would not have happened. I didn't do the investigation but read the reports.
The second was a loose connection at the battery. The leads to the battery were secured by wing nuts, (not a good idea and not allowed by ABYC) and they had loosened. There was no battery switch and the system was energized. The battery was withing a few inches of the tank ( a portable tank) The boat was tied up at the dock but subject to a lot of wave action. The persons who had just used the boat had spilled some gasoline in the bilge and hadn't cleaned it up, and it was floating on about an inch of water in the bilge. A couple of good sparks and away we go. This one I investigated myself on loan from the USCG to the local fire dept.
So, although a battery is normally not considered a source of ignition (no moving parts to make a spark), it can be if the circumstances are right. It is best to keep the battery away from the tank, or put some sort of barrier between the two. And the rules do say never place a battery directly above or below a fuel tank or fuel hose or fittings, and there should be at least 12 inch clearance all the way around a battery, tops, ends, and sides.
A battery box is not required by law, but is a very good way to achieve three things, protecting the lugs from accidental contact with tools or other metal objects, securing the battery from moving, and containing any spilled acid.
here's the USCG reg.
(c) Each metallic fuel line and fuel system component within 12 inches and above the horizontal plane of the battery top surface as installed must be shielded with dielectric material.
(d) Each battery must not be directly above or below a fuel tank, fuel filter, or fitting in a fuel line.
Now, this regulation does not apply to outboard boats, BUT, the ABYC standard says the same thing and does apply to outboards. So it is a very good idea. In other words move the battery/ies away from the fuel tank.
Fuel tank and battery mounting question
Moderators: Redneck_Randy, badmoonrising, lakerunner