DETROIT — A decade ago, when General Motors was on the brink of collapse and was ushered into bankruptcy by the federal government, the company’s unionized workers bore a significant portion of the pain to bring the automaker back to financial health.

The United Auto Workers agreed to allow General Motors to hire substantial numbers of new workers at roughly half the hourly wage of those already on the payroll and with reduced retirement benefits. In the following years, G.M. was also able to bring in temporary workers with even slimmer wage-and-benefit packages and little job security.

The bitter medicine helped reinvigorate the automaker, and for the last several years it has been reaping record profits. Along the way, it has pared its United States payrolls, closed several plants and moved more work to Mexico.

Now nearly 50,000 workers have walked off the job at more than 50 G.M. plants and other locations across the Midwest and South, striking to get what they see as their fair share of the company’s hefty returns and block further erosion of their ranks.