Inspired by the recent remarkable progress in the experimental test of local realism, we report here such a test that achieves an efficiency greater than (78%)^{2} for entangled photon pairs separated by 183 m. Further utilizing the randomness in cosmic photons from pairs of stars on the opposite sides of the sky for the measurement setting choices, we not only close the locality and detection loopholes simultaneously, but also test the null hypothesis against local hidden variable mechanisms for events that took place 11 years ago (13 orders of magnitude longer than previous experiments). After considering the bias in measurement setting choices, we obtain an upper bound on the p value of 7.87×10^{-4}, which clearly indicates the rejection with high confidence of potential local hidden variable models. One may further push the time constraint on local hidden variable mechanisms deep into the cosmic history by taking advantage of the randomness in photon emissions from quasars with large aperture telescopes.