Researchers at the University of Oklahoma in the US used microlensing to detect the objects in extragalactic galaxies that range from the mass of the Moon to the mass of Jupiter.
Microlensing is an astronomical phenomenon that uses the light bent by gravity itself to detect planets.
Professor Xinyu Dai and postdoctoral researcher Eduardo Guerras made the discovery with data from the NASA's Chandra X-ray Observatory, a telescope in space that is controlled by the Smithsonian Astrophysical Observatory.
"We are very excited about this discovery. This is the first time anyone has discovered planets outside our galaxy," said Xinyu Dai.
"These small planets are the best candidates for the signature we observed in this study using the microlensing technique. We analysed the high frequency of the signature by modelling the data to determine the mass," Dr Dai said.
Until this study published in The Astrophysical Journal Letters, there has been no evidence of planets in other galaxies.
"This is an example of how powerful the techniques of analysis of extragalactic microlensing can be," said Mr Guerras.
"This galaxy is located 3.8 billion light years away, and there is not the slightest chance of observing these planets directly, not even with the best telescope one can imagine in a science fiction scenario," he said.
"However, we are able to study them, unveil their presence and even have an idea of their masses. This is very cool science," Mr Guerras said.
Get the latest election news, live updates and election schedule for Lok Sabha Elections 2019 on ndtv.com/elections. Like us on Facebook or follow us on Twitter and Instagram for updates from each of the 543 parliamentary seats for the 2019 Indian general elections.