When it passed in front of a star further away from Earth, the gravity of the planet amplified the light of the star. The gravity of the planet, therefore, worked in a cosmic magnifying glass, so astronomers have been able to find it.
It is the first exoplanet they have discovered using this gravitational lens effect. It is found in the constellation of Sagittarius and rotates around a red dwarf.