The sushi eaten in Japan from ancient time to the middle ages was fermented until the rice turned to a paste (long-term fermentation), after which only the fish was consumed.
In the 1300s, this changed to a dish in which the rice was removed before it decomposed and then eaten with the fish (short-term fermentation).
From the early 1600s, people started trying even shorter fermentation periods. Also, instead of relying on the vinegar generated from the fermentation process, the method of using separately-made vinegar to bring out the acidity was invented. This was the birth of hayazushi (早寿司).
There are various methods of hayazushi using vinegar. On of those methods is stuffing vinegared rice in the belly of the fish. This is what we currently call sugatazushi (姿寿司), made from Pacific saury. Another method is alternately stacking vinegared rice and cuts of fish or mixing them and pressing in a container. This is what we know as hakozushi (箱寿司) or masuzushi (鱒寿司) .
The common characteristic of these different methods is the “pressing” after stuffing or mixing. This is known as oshizushi (押し寿司). In any case, the invention of the method of making sushi quickly and easily by combining with vinegared rice, seemed to suit the society of the time. It seems like it took off. This led to the decline of fermented sushi, which was widely replaced with hayazushi.
Eventually the hayazushi evolved into the nigiri sushi that we see today. In a sense, it is the ultimate hayazushi (since “hayai” means “quick” in Japanese).
This evolution hit a turning point around 1810 when Yohei Hanaya (花屋與兵衛) of Edo omitted the pressing part of oshizushi and instead put the topping on some vinegar rice pressed into the proper shape in the hand, inventing nigiri sushi. This is called “Edomae Sushi” because it was originally made using fish caught in the Edo Sea.