Before the village system was established with the founding of Konohagakure by the Senju and Uchiha, the Era of the Warring States (戦国時代, Sengoku Jidai) was an extremely lengthy and bloody period in history where hundreds of individual shinobi clans fought in constant, bitter warfare.
During this era, conflicts perpetually arose between the various nations as each crusaded for more rights and land. In order to wage these wars, each individual shinobi clan rented its military might to the highest bidder. Due to the unrelenting violence, the average life-span for a shinobi as well as civilians were a mere 30 years, though the single biggest reason for the continuing fall in life expectancy was the slaughter of countless conscripted children. With the continued loss of their kin, a never ending cycle of death and revenge was born, which saw shinobi having to even conceal their surnames for fear of retaliation.
Amongst the warring clans, only two came to be feared as the strongest: the Senju clan and the Uchiha clan, who developed a deep enmity as they were often hired to oppose one another due to their rivaling strength. Eventually, both Hashirama Senju and Madara Uchiha grew to become the respective leaders of these rival clans, but despite their childhood friendship, the two were inevitably pitted against one another. During this time, Madara and his brother discovered the secret of the Sharingan; becoming the first to awaken the Mangekyō Sharingan. Though with the constant battles, Madara's vision degraded further and further until he acquired Izuna's Mangekyō Sharingan, integrated it into his own and gained the "Eternal" Mangekyō Sharingan.
However, after decades of conflict, most of the clans under the Uchiha and Senju banners were growing weary of the continued bloodshed. They were later urged to form a lasting truce by Hashirama (who still hoped to achieve his and Madara's original dream of peace). The only person who opposed this peace was Madara, who argued for the Uchiha clan to continue the fighting as he was still bitter after the death of Izuna, but was ultimately persuaded to join in a permanent alliance with the Senju clan after Hashirama demonstrated his worth by nearly committing suicide in compensation. Soon after, a pact was formed with the Land of Fire and thus, Konohagakure was formed. This set a precedence which others soon followed, creating the Five Great Shinobi Countries, as well as some smaller, outlying villages and settlements. However, peace wouldn't last. Soon, the villages began to compete for resources such as control of the tailed beasts and this competition eventually escalated into the First Shinobi World War.
The Sengoku Period (戦国時代, Sengoku Jidai) or Warring States Period, was a time when Japan was in civil war and the demand for ninja was high. This moment in history was the time of many of famous ninja, including Hattori Hanzō. But after the war resolved, their services were cut in a united Japan and, ninja began to fade into history. The Warring States Period (simplified Chinese: 战国时代; traditional Chinese: 戰國時代; pinyin: Zhànguó Shídài) is also a period in Chinese History, following the Spring and Autumn period and concluding with the victory of the state of Qin in 221 BC, creating a unified China under the Qin Dynasty.