The Na+,K+-ATPase generates electrochemical gradients of Na+ and K+ across the plasma membrane. Here, we describe a 4.0 Å resolution crystal structure of the pig kidney Na+,K+-ATPase stabilized by beryllium fluoride (denoted E2-BeFx). The structure shows high resemblance to the E2P phosphoenzyme obtained by phosphorylation from inorganic phosphate (Pi) and stabilised by cardiotonic steroids, and reveals a Mg2+ bound near the ion binding site II. Anomalous Fourier analysis of the crystals soaked in Rb+ (K+ congener) followed by a low resolution rigid-body refinement (6.9-7.5 Å) revealed pre-occlusion transitions leading to activation of the desphosphorylation reaction. Mg2+ location indicates a site of an initial K+ recognition and acceptance upon binding to the outward-open E2P state after Na+ release. Despite the overall structural resemblance to the Pi-induced E2P phosphoform, BeFx inhibited enzyme is able to binds both ADP/ATP and ions, the features that relate E2-BeFx complex to an intermediate of the functional cycle of the Na+,K+-ATPase prior E2P.