In the late-19th century, socialists, communists and trade unionists chose May 1 to become International Workers' Day.
The date was symbolic, commemorating the Haymarket affair, which took place in Chicago, in the US, in 1886.
For years, the working class - often forced to work up to 16 hours a day in unsafe conditions - had been fighting for an eight-hour workday.
Then, in October 1884, the Federation of Organized Trades and Labour Unions of the United States and Canada decided that May 1, 1886, would mark the first day that an eight-hour workday would go into effect.
When that day arrived, between 300,000 and a half-million American workers went on strike in cities and towns across the country, according to various historians' estimates.
Chicago, which was the nucleus of the struggle, saw an estimated 40,000 people protest and strike.
Until May 3, the strike was well-coordinated and largely nonviolent.
But as the end of the workday approached, striking workers in Chicago attempted to confront strikebreakers at the McCormick Harvesting Machine Company. Large police contingents were protecting the strikebreakers, and officers opened fire on the striking workers, killing at least two.
As the police attempted to disperse the protesters on May 4 in Chicago's Haymarket Square, a bomb was thrown at them, killing seven officers and at least four civilians.
Police subsequently rounded up and arrested eight anarchists, all of whom were convicted of conspiracy. A court sentenced seven to death and one to 15 years imprisonment. Four were hanged, one committed suicide rather than face the gallows and two had their sentences commuted to life in prison.
Those who died are regarded by many on the left, including both socialists and anarchists, as the "Haymarket Martyrs".
The Haymarket affair galvanised the broader labour movement.
In 1889, the Second International, the international organisation for workers and socialists, declared that May 1 would from then on be International Workers' Day.
In the US, however, the eight-hour work day wasn't recognised until it was turned into law in 1916, after years of strikes, protests and actions in favour of it.