We propose a new scenario for supermassive star (SMS: >rsim 105 M⊙) formation in shocked regions of colliding cold accretion flows near the centres of the first galaxies. Recent numerical simulations indicate that assembly of a typical first galaxy with virial temperature Tvir≳104 K proceeds via cold and dense flows penetrating deep to the centre, where supersonic streams collide with each other to develop a hot (∼104 K) and dense (∼103 cm−3) shocked gas. The post-shock layer first cools by efficient Lyα emission and contracts isobarically until ≃8000 K. Whether the layer continues its isobaric contraction depends on the density at this moment: if the density is high enough to excite H2 rovibrational levels collisionally (>rsim 104 cm−3), enhanced H2 collisional dissociation suppresses the gas from cooling further. In this case, the layer fragments into massive (>rsim 105 M⊙) clouds, which collapse isothermally (∼8000 K) by Lyα cooling without subsequent fragmentation. As an outcome, SMSs are expected to form and eventually evolve into the seeds of supermassive black holes (SMBHs). By calculating the thermal evolution of the post-shock gas, we delimit the range of post-shock conditions for SMS formation, which can be expressed as T≳6000 K (nH/104 cm−3)−1 for and T>rsim 5000 –6000 K for nH≳104 cm−3, depending somewhat on the initial ionization degree. We found that metal enrichment does not affect the above condition for metallicity below ≃10−3 Z⊙ if metals are in the gas phase, while condensation of several per cent of metals into dust decreases this critical value of metallicity by an order of magnitude. Unlike the previously proposed scenario for SMS formation, which postulates extremely strong ultraviolet radiation to quench H2 cooling, our scenario here naturally explains SMBH seed formation in the assembly process of the first galaxies, even without such strong radiation.