The fair-sampling loophole is closed in a Bell inequality violation experiment with entangled photons, making the photon the first physical system for which all the main loopholes have been closed. So-called Bell experiments are used to discriminate between classical ('local realistic') and quantum models of measurable phenomena. In practice, they are subject to various loopholes (arising from non-ideal experimental conditions) that can render the results inconclusive. These authors used a highly efficient source of photon pairs and superconducting transition-edge sensors in a Bell inequality experiment that closes the 'fair-sampling' loophole for entangled photons. The results conflict with local realism, while making the photon the first physical system for which each of the main loopholes has been closed, albeit in different experiments. The violation of a Bell inequality is an experimental observation that forces the abandonment of a local realistic viewpoint—namely, one in which physical properties are (probabilistically) defined before and independently of measurement, and in which no physical influence can propagate faster than the speed of light1,2. All such experimental violations require additional assumptions depending on their specific construction, making them vulnerable to so-called loopholes. Here we use entangled photons to violate a Bell inequality while closing the fair-sampling loophole, that is, without assuming that the sample of measured photons accurately represents the entire ensemble3. To do this, we use the Eberhard form of Bell’s inequality, which is not vulnerable to the fair-sampling assumption and which allows a lower collection efficiency than other forms4. Technical improvements of the photon source5,6 and high-efficiency transition-edge sensors7 were crucial for achieving a sufficiently high collection efficiency. Our experiment makes the photon the first physical system for which each of the main loopholes has been closed, albeit in different experiments.