As we have seen (section 5), one who puts out a fire only transgresses rabbinically, according to most poskim. Only one who extinguishes a fire in order to produce charcoal is doing so le-tzorekh gufo. When one puts out a fire in order to prevent damage from occurring, he is not interested in the act of extinguishing, but in creating a situation in which the fire is gone. Accordingly, this is considered a melakha she-eina tzerikha le-gufah.
Therefore, even though the Sages insisted that one may not put out a fire in order to salvage property, they permitted extinguishing a fire that has the potential to cause mass injury. For example, if there is a burning ember in a public domain, where many people are liable to be harmed by it, one may remove it even though it is muktzeh. If it is impossible to move it, the Sages permitted extinguishing it in order to prevent harm to the public, even though there is no danger to human life. However, in Israel, one may not call the fire department, because their travel involves Torah prohibitions, and one may not violate Torah law in order to prevent possible harm that does not involve potential loss of life. In the Diaspora, where firefighters are non-Jews, one may call the fire department, as this only involves the violation of a rabbinic prohibition (SA 334:27; see below 27:16).
To summarize, we have discussed three situations in which one may put out a fire directly or indirectly:
1) In a situation of danger to human life, it is a mitzva to do everything possible to save lives.
2) In a situation where there is a danger of harm to the public, one may put out the fire (as the Sages did not apply rabbinic rules in such a case), but one still may not violate Torah prohibitions to do so.
3) In a situation where there is financial loss but no threat of physical harm to humans, one may not extinguish the fire. Nevertheless, one may do so via grama. One may also hint to a non-Jew to put out the fire.