Samurai
Japan's hereditary warrior caste, which ruled the country for seven centuries, spent its last two hundred years as bureaucrats, and then abolished itself.

The samurai are usually pictured as swordsmen. For most of their history they were closer to landlords, and for their final two centuries most of them were closer to civil servants. Understanding that arc is the key to the strangest fact about modern Japan: the men who dismantled the warrior caste were samurai themselves.
The word comes from a verb meaning to serve. The class grew out of the mounted archers who policed Japan's frontier provinces from the ninth century onward, hired muscle for an aristocracy in Kyoto that preferred poetry to fighting. Provincial muscle with land eventually stops taking orders. In 1185 the Minamoto clan defeated its rivals and set up a military government at Kamakura, and from then until 1868 Japan was governed by warriors in the emperor's name.
The caste hardens
Through the wars of the fifteenth and sixteenth centuries the boundary between warrior and farmer stayed blurred; peasants fought, and successful fighters became lords. Toyotomi Hideyoshi, himself a peasant's son who rose to rule Japan, closed that door behind him. His sword hunt of 1588 stripped weapons from the countryside, and subsequent edicts fixed each household permanently as warrior, farmer, artisan, or merchant. Under the Tokugawa shogunate this hardened into law. Only samurai could carry the daisho, the paired long and short swords that marked the class on sight, and only samurai held office.
They were roughly five to six percent of the population, something like two million people with their families, which made them one of the largest privileged castes in any pre-modern society. They were paid in rice, measured in koku, drawn from their lord's domain revenue. And after 1615 they had nothing to fight. Two and a half centuries of peace turned a warrior aristocracy into a salaried officialdom that inherited its posts, drilled with wooden swords, and increasingly ran up debts to the merchants it officially outranked. The elaborate ethic of bushido was largely codified in exactly this period, by men who had never seen a battle, which is usually when codes of honor get written down.
Abolition
By the 1850s the arrangement was visibly rotten, and the sharpest critics of it were samurai from the outer domains. When they seized power in 1868, they concluded that the caste system that produced them was precisely what made Japan too weak to resist the West, and they began cutting.
The domains were abolished in 1871, which severed the lord-retainer bond outright. The conscription law of 1873 handed military service to ordinary peasants, ending the samurai monopoly on arms. In 1876 the government did the two things that finished the class: the Haitorei edict banned the wearing of swords in public, and the rice stipends were forcibly converted into interest-bearing government bonds, a one-time payout that inflation soon ate. Roughly two million people lost their income, their status, and their identity within five years.
Some rose in revolt, most catastrophically in the Satsuma Rebellion of 1877, and were destroyed by peasant conscripts with modern rifles. Others took the bonds, went into business, the new army's officer corps, the bureaucracy, and the schools, where they carried the old ethic of service and self-sacrifice into every institution of the modern state.
That is why the samurai never quite disappeared. The class was abolished; its values were nationalized. The reworked warrior ethic was taught to conscript soldiers who had no warrior ancestors at all, and in the 1930s and 1940s it was invoked to demand that ordinary Japanese die rather than surrender. A caste built on the idea that honor belonged to a hereditary few ended by handing that idea to everyone.