In the meanwhile, a little ameliorative labor legislation was being passed by state legislatures and by Congress. A Massachusetts law of 1866 forbade the employment of children under ten years of age in manufacturing establishments, prohibited the employment of children between the ages of ten and fourteen for more than eight hours per day, and provided that children who worked in factories must attend school at least six months in the year. In 1868 a federal act constituted eight hours a day's work for government laborers, workmen and mechanics, but some doubt arose as to the intent of part of it and the law was not enforced. In many states eight-hour bills were introduced, but were defeated in all except six, of which Connecticut, Illinois and California were examples, and even in these cases the laws were not properly drawn up or were not enforced. In 1869 a Bureau of Statistics of Labor was established in Massachusetts which led the way for similar enterprises in other states. It collected information concerning labor matters and reported annually to the legislature. In 1874 a Massachusetts ten-hour law forbade the employment of women and minors under eighteen for more than sixty hours a week, although refraining from the regulation of working hours for men. In 1879, in imitation of English factory acts, Massachusetts passed a general law relating to the inspection of manufacturing establishments. It provided that dangerous machinery must be guarded, proper ventilation secured, elevator wells equipped with protective devices and fire-escapes constructed. Other states followed slowly, but legislation was frequently negatived by lack of effective administration. In brief, then, agitation previous to 1877 had resulted in the passage of a few protective acts, but even these were restricted to a few states and were not well enforced. It was, therefore, more than a mere coincidence that the first general strike movement spread over the country in this same year, 1877.

It will be remembered that the great railroad strikes of that year extended over many of the northern roads but caused most trouble in Martinsburg, West Virginia, Pittsburg and other railway centers. Much property was destroyed, lives were lost, and the strikers failed to obtain their ends.[3] Other effects of the controversy, moreover, made it an important landmark in the history of the labor question. The inconvenience and suffering which the strike caused in cities far distant from the scene of actual conflict indicated that the transportation system was already so essential a factor in welding the country together that any interruption to its operation had become intolerable. The hostility of some of the railway managers to union among their laborers and the rumors that they were determined to crush such organizations augured ill for the future. The hordes of unemployed workmen and the swarms of tramps which had resulted from the continued industrial depression of 1873 insured rioting and violence during the strike, whether the strikers themselves favored it and shared in it or not. The destruction of property which resulted from the strike caused many state legislatures to pass conspiracy laws directed against labor; more attention was paid to the need of trained soldiers for putting down strikes, and the construction of many armories followed; and the courts took a more hostile attitude toward labor unions. Equally important was the effect on the workmen themselves. When the strike became violent and the state militia failed to check it, the strikers found themselves face to face with federal troops. President Hayes could not, of course, refuse to repress the rioters; nevertheless his action aligned the power of the central government against the strikers, and seemed to the latter to align the government against the laborers as a class. Of a sudden, then, the labor problem took on a new and vital interest; workingmen's parties "began to spring up like mushrooms"; and the laboring men saw more clearly than ever the essential unity of their interests.

Industrial unrest increased rather than diminished during the prosperous eighties; for the first five years of the decade, strikes and lockouts together averaged somewhat over five hundred annually. The climax came in "the great upheaval" of 1884 to 1886.[4] In the latter year nearly 1600 controversies involved 610,024 men and a financial sacrifice estimated at $34,000,000. Early in May, 1886, occurred the memorable Haymarket affair in the city of Chicago. The city was a center of labor agitation, some of it peaceful, some of it in the hands of radical European anarchists whose methods were shown in a statement of one of their newspapers, The Alarm, on February 21, 1885:

Dynamite! Of all the good stuff, this is the stuff. Stuff several pounds of this sublime stuff into an inch pipe … plug up both ends, insert a cap with a fuse attached, place this in the immediate neighborhood of a lot of rich loafers … and light the fuse. A most cheerful and gratifying result will follow.

On May 1 strikes began for the purpose of obtaining an eight hour day. During the course of the strike some workmen gathered near the McCormick Reaper Works; the police approached, were stoned, and retorted by firing upon the strikers, killing four and wounding many others. Thereupon the men called a meeting in Haymarket Square to protest against the action of the police; in the main they were orderly, for Mayor Carter Harrison was present and found nothing objectionable. Later in the evening, when the Mayor and most of the audience had left, remarks of a violent nature seem to have been made, and at this point a force of 180 police marched forward and ordered the meeting to disperse. Just then a bomb was thrown into the midst of the police, killing seven and wounding many others. The entire nation was shocked and terrified by the event, as hitherto anarchy had seemed to be a far-away thing, the product of autocratic European governments. The thrower of the bomb could not be discovered, but numerous anarchists were found who themselves possessed such weapons or had urged violence in their speeches or writings. Eight of them, nearly all Germans, were tried for murder on the ground that the person who threw the bomb must have read the speeches or writings of the accused anarchists and have been thereby encouraged to do the act. The presiding judge, Joseph E. Gary, was of the opinion that the disposition in the guilty man to throw the bomb was the result of the teaching and advice of the prisoners. The counsel for the accused declared that since the guilty person could not be found it was impossible to know whether he had ever heard or read anything said or written by the prisoners, or been influenced by their opinions. Eventually seven anarchists were convicted, of whom four were hanged, one committed suicide, and three were imprisoned. In 1893 the Governor of Illinois, John P. Altgeld, pardoned the three prisoners, basing his action mainly on the ground that no proof had been brought forward to show that they were in any way acquainted with the unknown bomb-thrower. The result of the conviction was the break-up of the radical anarchistic movement and also the temporary discrediting of the general agitation for an eight hour day, although neither the Knights of Labor nor the Federation of Labor had any connection with the anarchists, and both deprecated violence.

In the meanwhile, Congress had concerned itself slightly with the labor problem. In 1884 a Bureau of Labor had been established to collect information on the relation of labor and capital. Two years later, just before the Haymarket affair, President Cleveland had sent a message to Congress in which he adverted to the many disputes which had recently arisen between laborers and employers, and urged legislation to meet the exigency. Considerations of justice and safety, he thought, demanded that the workingmen as a class be looked upon as especially entitled to legislative care. Although Cleveland deprecated violence and condemned unjustifiable disturbance, he believed that the discontent among the employed was due largely to avarice on the part of the employing classes and to the feeling among workmen that the attention of the government was directed in an unfair degree to the interests of capital. On the other hand, he suggested that federal action was greatly limited by constitutional restrictions. He accordingly urged that the Bureau of Labor be enlarged and that permanent officers be appointed to act as a board of arbitration in industrial disputes. The legislative branch was not inclined to follow Cleveland's lead, although he returned to the subject after the Haymarket affair, for it was commonly felt that his suggestion was too great a step in the direction of centralization of government. Two years later, in 1888, a modest act was passed which provided for the investigation of differences between railroads and their employees, but only when agreed to by both parties, and no provision was made for the enforcement of the decision of the investigators. The practical results were not important. Similar action had already been taken in a few states. By 1895 fifteen states had laws providing for voluntary arbitration, but the results were slight in most cases.

Very little progress was being made in the states in the passage of other industrial legislation. In Alabama and Massachusetts in the middle eighties acts extended and regulated the liability of employers for personal injuries suffered by laborers while at work.[5] At the same time the attitude of the legislatures and the courts in some states toward strikes underwent a slight modification. In many states where the legislatures had not passed definite statutes to the contrary, it had been held by the courts that strikers could be tried and convicted for conspiracy. In a few cases, states passed acts attempting to define more exactly the legal position of strikers. A New York court in 1887, for example, held that the law of the state permitted workmen to seek an increase of wages by all possible means that fell short of threats or violence. Before the close of Cleveland's second administration, considerable progress had been made in state legislation concerning conditions and hours of labor for women and children, protection of workers from dangerous machinery, the payment of wages, employer's liability for accidents to workmen, and other subjects. On the other hand, in some cases unreasonable or ill-considered actions on the part of the unions or their active agents—the "walking delegates"—turned popular sentiment against them. Particularly was this true in cases of violence and of strikes or boycotts by unions in support of workmen in other trades at far distant points.

During the presidential campaign of 1892 a violent strike at the Carnegie Steel Company's works in Homestead, Pennsylvania, arose from a reduction in wages and a refusal of the Company to recognize the Iron and Steel Workers' Union. An important feature of this disturbance was the use of armed Pinkerton detectives by the Company for the protection of its buildings. Armed with rifles they fell into conflict with the workmen, a miniature military campaign was carried on, lives were lost and large amounts of property destroyed. Eventually the entire militia of the state had to be called out to maintain peace.

It remained, however, for Chicago and the year 1894 to present one of the most far-reaching, costly and complex labor upheavals that has ever disturbed industrial relations in America. So ill understood at the time were the real facts of the controversy that it is doubtful whether it is possible even now to distinguish between truth and rumor in regard to some of its aspects.

The town of Pullman, near Chicago, was the home of the Pullman Palace Car Company, a prosperous corporation with a capital of $36,000,000. It provided houses for its employees, kept up open stretches of lawn, flower beds and lakes. In 1893 and 1894, when general business conditions were bad, the Company reduced the wages of its workmen about twenty-five per cent. A committee of the men asked for a return to former rates, but they were refused, three members of the committee were laid off, and the employees then struck. Late in June, 1894, the American Railway Union, to which many of the workmen belonged, took up the side of the men, and the General Managers' Association, comprising officials of twenty-four roads entering Chicago, took the side of the Company. Through the entry of the Union and the Association, the relatively unimportant Pullman affair expanded to large proportions. Violence followed; cars were tipped over and burned; property was stolen and tracks ruined; and eventually the United States government was drawn into the controversy.