The Wags (water and gas shutoff) valve is a simple, inexpensive, and reliable way to guard against disastrous water problems that can arise when water heaters develop a leak. The valve, which can be used for new or existing water heaters, is totally mechanical and can be installed with or without an electric harness. The valve rests in a water heater drain pan. The cold water supply runs through the valve before entering the appliance. If a leak occurs, an internal water-soluble fiber element dissolves, releasing a powerful, spring-loaded piston that closes flow of water to the tank. With the addition of a wiring harness for gas-fired appliances, this action will also break a fuse to shut off the water heater’s gas supply. The valve’s action is based on fiber element technology developed for the British Royal Air Force to inflate life jackets automatically.