Before the village system was established with the founding of Konohagakure by the Senju and Uchiha, the Warring States Period (戦国時代, 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. It was during this time period that Madara Uchiha and Hashirama Senju met and eventually befriended each other. Angered by the senseless slaughter of their siblings, the two began to dream of a world where peace reigned and children live full lives instead of dying on the battlefield. They also began to train with each other in hopes of achieving it. Unfortunately, this friendship was short lived as both were discovered by their respective fathers and brothers. With Madara choosing to protect his brother at all costs, the two former friends drifted apart and were forced to fight each other on the battlefield.
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 rivalling strength. Eventually, both Hashirama Senju and Madara Uchiha grew to become the respective leaders of these rival clans, but despite their childhood friendship and shared dreams, 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. Some time before Konoha's founding and after the death of Izuna, some members of the Uchiha clan began to willingly surrender, realising that they were outclassed by the Senju. The two clans 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, a disillusioned Madara would defect from the village and challenge Hashirama at the Valley of the End and was ultimately defeated. Soon afterwards, the villages began to compete with each other 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 with the Chinese Empire split in to various warring city-states led by numerous warlords. It followed the Spring and Autumn period and concluded with the victory of the state of Qin in 221 BC; creating a unified China under the Qin Dynasty.