If General Motors itself were one big car, its “check engine” light would be flashing. The world’s largest car maker announced this week that it plans to shed 30,000 workers by 2008 as its market share and stock price continue to slide against a backdrop of unsustainable labor costs.

In the past 25 years, GM has seen its share of domestic automobile and light truck sales fall from half to a quarter. In the last quarter alone, it lost more than $1 billion and its corporate bonds were recently downgraded to junk status. The recent job cuts follow years of declining employment at the company.

Like the mysterious dash-board signal, the reasons behind GM’s woes are open for debate. The United Auto Workers union blames management for not developing and promoting more appealing cars. Management blames the relatively high cost of its union labor, including generous pension and health-care expenditures. And lurking in the background is that old bugaboo of allegedly unfair foreign competition.

So far, GM and the other struggling U.S. automaker, Ford, have not called explicitly for new trade barriers against imported cars. But given the rising rhetoric in Congress against imports from China and trade in general, and past U.S. “voluntary quotas” on Japanese auto imports, the possibility of a new backlash against imported cars is real. GM is already complaining that Japan is “manipulating” its exchange rate to give its own auto exporters an unfair advantage in the U.S. market.

There are plenty of reasons behind the troubles at GM, but “unfair” competition from Japanese automakers is not among them. Japanese brands have certainly been gaining market share in the United States, but that has arguably more to do with the more appealing design, price, and quality of the cars than exchange rates. In fact, two-thirds of the Japanese cars Americans buy are not imported from Japan but are in fact made in North America, according to the Japan Automobile Manufacturers Association, and would not be affected much by the exchange rate anyway.

While GM struggles, America’s automobile industry as a whole is doing quite well. Last year, American workers in U.S.-based automobile plants assembled 12 million cars and light trucks. That compares to an average of 10.6 million a year in the decade before enactment of the North American Free Trade Agreement in 1994. In the past decade, the total volume of automobiles and parts manufactured in the United States has grown by 40 percent, according to the Federal Reserve Board. All that means that production and jobs have not been shifting from GM to rival automakers abroad, but to its rivals inside the United States.

Unions and management at GM are both partially right. Union leaders are correct that GM’s management has failed to adequately maintain an appealing lineup of cars to defend and expand its market share. And management is also right that GM’s generous labor contracts have saddled the company with extra costs that render too much of its product line uncompetitive.

Healthcare costs alone impose an average cost of $1,500 per GM vehicle. Unlike most U.S. private-sector workers, GM’s unionized workers do not pay deductibles on their health coverage. According to the UAW contract in force until 2007, GM’s hourly workers pay only 7 percent of their total healthcare costs, compared to 27 to 32 percent paid by the average U.S. salaried worker. Recent “concessions” by GM’s unions will slow the hemorrhaging, but they may be too little, too late.

In contrast, most foreign-owned auto plants in the United States are non-unionized. Their workers are not as generously compensated as GM’s workers, but they are relatively well-paid with good benefits. And because their employers are not saddled with the uneconomic pension and healthcare costs of a UAW contract, they can produce cars at a more competitive price, creating more opportunity and job security for existing workers. Michigan-based GM’s toughest competition these days is not from Japan, but from Ohio, Kentucky, Tennessee, Mississippi, South Carolina and the other states where foreign-owned auto companies have established production facilities.

Trade barriers and harangues about exchange rates won’t save GM from itself and its unions. In an internationally competitive domestic market, GM will need to earn back its market share the old fashioned way: by controlling its costs and by producing cool cars at a price that more Americans are willing to pay.