After the 4th shinobi war there was a time for peace but there was a new perspective emerging among the Daimyo. After seeing the likes of Uchiha Madara, Uzumaki naruto, and the Kages in action at full power and the effects of those battles the Daimyo realized that the weapons and tools they had used for decades were beginning to be to powerful to keep under control. While Uzumaki as Hokage lead the villages in a reduction in military power the Daimyo began plotting with each other trying to devise ways to keep the shinobi under their thumb or in the worst case eliminate them.
Weapons developed by the Daimyo's engineers could put more power into the hands of a typical soldier than previously but things were still not ripe for change. The drawdown of forces was good from the perspective of the Daimyo but that didn't stop the fact that there still existed the possibility of individual Shinobi that could devastate armies single handed. The Daimyo made there move as Uzumaki Naruto arguably the most powerful Shinobi alive was reaching his eightieth birthday and was putting decades of knowledge and research to use to use to pacify the tailed beasts once and for all.
The attack came hard and fast with the Daimyo sending out there newly armed rifle troops the all of the major villages. The shinobi caught unaware took heavy casualties and while the troops posed little threat to Uzumaki himself it was wnough for him to lose control of the vast forces he was manipulating and most of Konoha was wiped from the map in an instant. The other villages were forced to disband and flee the Daimyo tha wer continuing to gain power.
For eighty more years the Shinobi waged guerrilla war and infiltrated the normal society and in time their moment came as well as with subtle pushes the populace revolted against the Daimyo overlords in a new revolution. The war with the Daimyo was both good and bad for the shinobi, the were recruited by the revolutionaries and some even decided to fight on the side of the Daimyo with cash being more valuable than the previous enmity. On the positive side the Shinobi were no longer hunted and on the other those in the revolution knew how dangerous they could be and after the hard fight of revolution decided to never bow down again.
The new Society is a unique one. Shinobi clans hold power in all its forms though are carefully watched. There is no longer a formal village system based in a single location instead there are loose and ever shifting alliances of clans. Shinobi work on both sides of the law. Ancient scrolls and artifacts coexist with Skyscrapers and Airplanes.