Analogues of primeval galaxies two billion years after the Big Bang