A search for the B 0 → K þ K − decay is performed using pp-collision data collected by LHCb. The data set corresponds to integrated luminosities of 1.0 and 2.0 fb −1 at center-of-mass energies of 7 and 8 TeV, respectively. This decay is observed for the first time, with a significance of more than 5 standard deviations. The analysis also results in an improved measurement of the branching fraction for the B . The first uncertainty is statistical, the second is systematic, the third is due to the uncertainty on the B 0 → K þ π − branching fraction used as a normalization. For the B 0 s mode, the fourth accounts for the uncertainty on the ratio of the probabilities for b quarks to hadronize into B 0 s and B 0 mesons.