A galaxy that has taunted astronomers since they first detected a hint of its presence more than 20 years ago has finally emerged from hiding.

It's called HIPASS J1131-31, or Peekaboo, and it is located just 22 million light-years away. And it was so hard to see because it's teeny tiny and obscured by a bright star in the Milky Way that sits almost directly in front of it.

Through a collaborative effort that involved space- and ground-based telescopes, scientists have learned that the extremely small Peekaboo is also extremely young and close – offering a snapshot of galactic infancy.

"Uncovering the Peekaboo Galaxy is like discovering a direct window into the past, allowing us to study its extreme environment and stars at a level of detail that is inaccessible in the distant, early Universe," says astronomer Gagandeep Anand of the Space Telescope Science Institute in Baltimore.

Given the absolute preponderance of stuff out there in the Universe, it's pretty common for foreground objects to sit in front of more distant ones. So when the HI Parkes All Sky Survey caught the galaxy peeking out from behind the bright star TYC 7215-199- 1in the early 2000s, it wasn't a huge surprise.

Ultraviolet observations revealed that Peekaboo is what is known as a compact blue dwarf galaxy: a small galaxy bursting with the formation of young stars, the brightest of which appear to be blue.

But the light of star TYC 7215-199-1 and its diffraction artifacts obscured the galaxy from clear view.

That might have been that – except it turned out that the star was a fast-moving one, and the direction it moves is away from the galaxy. If we had looked 100 years ago, we might not have seen the galaxy at all. Over the last couple of decades, this gap has continued to widen. And our space-watching technology has grown more and more powerful.

So an international team led by astronomer Igor Karachentsev of the Russian Academy of Sciences revisited Peekaboo for a closer look. They used the Hubble Space Telescope for optical observations, the Southern African Large Telescope for optical spectra, and the Australia Telescope Compact Array (ATCA) for radio observations.

These observations not only resolved around 60 individual stars in Peekaboo but helped the researchers determine what the stars are made of.

"At first, we did not realize how special this little galaxy is," says astronomer Bärbel Koribalski of the Commonwealth Scientific and Industrial Research Organisation (CSIRO) in Australia and the researcher who first detected HIPASS J1131-31's presence.

"Now, with combined data from the Hubble Space Telescope, the Southern African Large Telescope, and others, we know that the Peekaboo Galaxy is one of the most metal-poor galaxies ever detected."

All the stars resolved by Hubble seem to be less than a few billion years old, at most, meaning that Peekaboo appears to be very young in the scheme of the Universe.

And Peekaboo has a strikingly low abundance of metals. Generally, low metallicity indicates that an object formed in the early Universe; more recent objects have a higher heavy element content.

This is because there wasn't much metal going around in the very early Universe. In the epoch following the Big Bang 13.8 billion years ago, the Universe was predominantly made up of hydrogen and helium. It was from these elements that the first stars formed, fusing hydrogen and helium into heavier elements, all the way up to iron.

Metals heavier than iron were forged in the violent supernova explosions when stars died, scattering out into the Universe where they could be incorporated into the formation of new stars.

In addition to its young star population, the researchers made only tenuous detections of the signatures of old stars, suggesting that star formation in Peekaboo only started a few billion years ago.

This means that it could be an example of what the earliest generation of galaxies looked like and the star populations within.

It's essentially a time capsule and practically right next door, cosmically speaking. Because the Hubble observations were not particularly detailed, the researchers hope to revisit the galaxy with JWST to make a more detailed catalog of its chemistry.

"Due to Peekaboo's proximity to us, we can conduct detailed observations, opening up possibilities of seeing an environment resembling the early Universe in unprecedented detail," Anand says.

The research has been accepted into the Monthly Notices of the Royal Astronomical Society.