When Mark Twain collaborated with his neighbor Charles Dudley Warner in 1873 to write the novel The Gilded Age, it received mixed reviews—but it became a classic, in large part because of its title, which has come to define an era of thorough and deep corruption in public affairs and governance.
Not the least of the corrupting and shocking dynamics of that era was the spoils system—the distribution of government jobs not based on competence, experience, or expertise, but for political patronage, to curry favor and extract in return money to remain in office or to attain office.
Despite public unhappiness, the spoils system remained in place—its Republican supporters, including Chester Arthur, were called "the Stalwarts"—until a massive public uprising upon the assassination of President Garfield by a disappointed office seeker. Charles Guiteau shouted after shooting Garfield, "I am a Stalwart .... Arthur is president!" Guiteau was hanged, and Arthur, who was Garfield's vice president, ascended to the presidency.
But horrified by the assassination, Arthur abandoned his support for the spoils system and championed reform. The result was the Pendleton Act of 1883, which established the principle that government jobs should be awarded on the basis of merit, not patronage, creating the Civil Service Commission to implement merit exams and making it illegal to fire, demote, or harass civil servants for political reasons. (In an interesting bit of trivia, George Pendleton, the Ohio Democrat who was author of the act, was showcased in Steven Spielberg's movie Lincoln as a prime opponent of the 13th Amendment.)