When cosmic star formation history reaches a peak (at about redshift z approximate to 2), galaxies vigorously fed by cosmic reservoirs(1,2) are dominated by gas(3,4) and contain massive star-forming clumps(5,6), which are thought to form by violent gravitational instabilities in highly turbulent gas-rich disks(7,8). However, a clump formation event has not yet been observed, and it is debated whether clumps can survive energetic feedback from young stars, and afterwards migrate inwards to form galaxy bulges(9-12). Here we report the spatially resolved spectroscopy of a bright off-nuclear emission line region in a galaxy at z = 1.987. Although this region dominates star formation in the galaxy disk, its stellar continuum remains undetected in deep imaging, revealing an extremely young (less than ten million years old) massive clump, forming through the gravitational collapse of more than one billion solarmasses of gas. Gas consumption in this young clump is more than tenfold faster than in the host galaxy, displaying high star-formation efficiency during this phase, in agreement with our hydrodynamic simulations. The frequency of older clumps with similar masses(13), coupled with our initial estimate of their formation rate (about 2.5 per billion years), supports long lifetimes (about 500 million years), favouring models in which clumps survive feedback and grow the bulges of present-day galaxies.