We show that the superconducting-normal phase transition is due to spontaneous breaking of magnetic flux symmetry. In two dimensions the symmetry generator is Φ = ∫d 2 xB(x) and in three dimensions there are three generators Φ 1 = ∫d 3 xB 1 (x), only two of which are independent due to the absence of sources of magnetic field, In the normal phase the symmetry is spontaneously broken with a massless photon as a corresponding Goldstone boson. In the superconducting phase the symmetry is unbroken and the magnetic flux annihilates the vacuum which expresses the essence of the Meissner effect. In two dimensions we explicitly construct the pertinent gauge-invariant order parameter which is the operator creating Abrikosov vortices. Its vacuum expectation value vanishes in the superconducting ground state, while it is finite in the vacuum of the normal phase.