A search for the rare decays B0s→μ+μ− and B0→μ+μ− is performed at the LHCb experiment. The data analyzed correspond to an integrated luminosity of 1 fb−1 of pp collisions at a center-of-mass energy of 7 TeV and 2 fb−1 at 8 TeV. An excess of B0s→μ+μ− signal candidates with respect to the background expectation is seen with a significance of 4.0 standard deviations. A time-integrated branching fraction of B(B0s→μ+μ−)=(2.9+1.1−1.0)×10−9 is obtained and an upper limit of B(B0→μ+μ−)<7.4×10−10 at 95% confidence level is set. These results are consistent with the standard model expectations.