In the late 1800s, many Americans toiled 12 hours a day, seven days a week, often in physically demanding and low-paying jobs. Children worked too, on farms and in factories and mines. Conditions were often harsh and unsafe.

It was in this context that American workers held the first Labor Day parade, marching from New York’s City Hall to a giant picnic at an uptown park on Sept. 5, 1882.

“Working Men on Parade,” read the New York Times headline. The article, which appeared on the last page, reported that 10,000 people marched “in an orderly and pleasant manner.” It was far fewer than organizers had predicted. The workers included cigarmakers, dressmakers, printers, shoemakers, bricklayers and other tradespeople.

Because it wasn’t yet an official holiday, many of the attendees risked their jobs by participating in the one-day strike. On their signs, they called for “Less Work and More Pay,” an eight-hour workday and a prohibition on the use of convict labor. They were met with cheers.

The U.S. labor movement was among the strongest in the world at the time, and in the years that followed, municipalities and states adopted laws to recognize Labor Day. New York did so in 1887, and the Times reported that that year’s parade was larger than ever, even amid political tension over the role of socialist groups. Parks, shops and bars in the city were full.

“The barrooms were never more resplendent,” the Times wrote. “Liquidly, the first legal celebration of Labor Day may go down to history as an unqualified success.”

But it took several more years for the federal government to make it a national holiday — when it served a greater political purpose. In the summer of 1894, the Pullman strike severely disrupted rail traffic in the Midwest, and the federal government used an injunction and federal troops to break the strike.

It had started when the Pullman Palace Car Co. lowered wages without lowering rents in the company town, also called Pullman. (It’s now part of Chicago.)

The Pullman strike

When angry workers complained, the owner, George Pullman, had them fired. They decided to strike, and other workers for the American Railway Union, led by firebrand activist Eugene V. Debs, joined the action. They refused to handle Pullman cars, bringing freight and passenger traffic to a halt around Chicago. Tens of thousands of workers walked off the job, wildcat strikes broke out and angry crowds were met with live fire from authorities.

During the crisis, President Grover Cleveland signed a bill into law on June 28, 1894, declaring Labor Day a national holiday. Some historians say he was afraid of losing the support of working-class voters.

“There were many political advantages at that moment to provide recognition for Labor Day,” said Joshua Freeman, a professor of history at Queens College and the City University of New York Graduate Center.

But it wasn’t the only workingman’s holiday on the table. Starting in 1884, the labor movement had called for strikes and protests on May 1 to push for an eight-hour workday. That would-be holiday was called May Day, and it’s now celebrated around the world, though it’s not officially recognized in the United States.

For that, you might blame the Haymarket affair. On May 4, 1886, a bomb went off at a demonstration in Chicago’s Haymarket Square in support of an eight-hour workday and against police killings of protesters. Authorities opened fire, and seven officers and four protesters were killed.

The episode made headlines around the world, and the police response in Chicago was fierce. “The Anarchists Cowed,” read the headline on a front-page Times article on May 8, with a subtitle, “Forced to Seek Hiding Places — The Disorderly Element Thoroughly Frightened.” Eight anarchists were convicted, and four were hanged. Critics argued the trial was conducted poorly, and seven years later, Gov. John Altgeld pardoned the three who were still alive.

In ensuing years, May Day became an occasion for protesting the arrests of socialists, anarchists and unionists. As it became associated with the radical left — and as Labor Day was recognized by more and more states — the latter came to be the dominant holiday in the United States.