Earliest possible welfare state?

Like it says on the tin. What is the earliest possible point in which a country could create some sort of functioning welfare system (subsidies, labor rights, that sort of stuff)?

Bonus points if it occurs in the Middle Ages.

Song China, maybe, since they were apparently super close to industrializing, and would open quite a can of worms? My knowledge on the subject is sorely lacking, but it seems that the New Policies first implemented by chancellor Wang Anshi were a step in that direction.
 
Industrialization has nothing to do with the welfare state, its just that its when you get a mainly urban population that demand for a welfare state tends to become loud enough to have to be heeded. Cities tend to riot/revolt a lot quicker/nastier than villages. Industrialization is a driver for urbanization but not the only one.

Welfare states need three things to occur ,

Politics/culture that see charity and sharing the wealth as a good thing or needed to keep public order. Anarchist, libertarian and some religious societies tend to be against this on principle ( quoting self reliance or karma as reasons ).

Administration able to handle the sharing/distribution

Most importantly a big enough and reliable enough surplus to distribute. Far easier to have a welfare state if a country is rich ( relative to the period )

Totalitarian states tend to develop welfare states by default, the state owns everything and the people get a set ration.

Early example that existed OTL, the Roman Republic, by the 2nd Century BC it had organized relief for those in need, the Cura Annonae ( restricted to free citizens ) and had a legal system that gave rights to citizens as well as temples giving medical services. Main reason was to stop the poor rioting, which is why entertainments were also put on ( origin of the phrase "bread and circuses" ). It however helped that Rome's elite were judged on spending on public works and despised for hoarding ( not that it stopped some becoming in relative terms possibly the richest men in history )
 
Top