The present invention provides a miniature electrically operated valve that can stand off significant pressures, that can be inexpensively produced, and that can be made to operate without continuous electrical power. A valve according to the present invention comprises a housing and a beam mounted with the housing. A diaphragm mounted with the housing forms a sealed fluid volume. An electromagnetic energy source, such as an electromagnetic coil, mounts with the housing and when energized urges the beam in one direction. The beam can be urged in the opposing direction by passive means or by reversing the polarity of the electromagnetic energy source or by a second electromagnetic energy source. Two fluid ports mount with the housing. A first fluid port mounts so that, as the beam is urged in one direction or the opposite, the beam urges the diaphragm to move between engaging and substantially sealing the fluid port and disengaging and not substantially sealing the fluid port. A seat can be mounted with the diaphragm to aid in sealing the fluid port. Latching mechanisms such as permanent magnets can be mounted so that the valve remains in the open or closed positions without continuous electrical power input. Fluid can flow through the housing between the two fluid ports when the diaphragm does not seal the first fluid port, but can be prevented from flowing by urging the beam so that the diaphragm seals the first fluid port. Various embodiments accommodate various latching mechanisms, electromagnetic energy sources, number of fluid ports, and diaphragm design considerations.