During the replacement of a rig pump, the crew were cleaning the pump liners with brake cleaner. At the same time heat was being applied to a hammer union 3.4 meters away. The brake cleaner vapours were ignited causing a flash flame.