If you own stock in Wal-Mart Stores, be afraid — be very afraid. Yes, it wasn’t all that long ago that I was recommending buying shares of the giant retailer. But things have changed.

Right after I recommended Wal-Mart last October it rallied by as much as 15%. But now it’s given most of that back, even as the Dow Jones Industrial Average — of which Wal-Mart is a part — has climbed to within shooting distance of all-time highs. And it’s not because the Christmas selling season turned out to be good rather than great. It’s because of politics.

On Thursday, the Maryland legislature decided to play Robin Hood with shareholders’ money. After they targeted Wal-Mart for a massive new tax, the stock’s market value dropped by $1.5 billion in a span of 90 minutes. But our wannabe Robin Hoods blew it. That money robbed from the rich isn’t going to the poor.

Here’s what happened Thursday. The Maryland General Assembly voted to tax Wal-Mart by the amount which the company’s expenditures on employee health care falls below 8% of payroll costs. That’s about twice as much as Wal-Mart now spends on health benefits for its 15,000 Maryland workers, so the tax is going to be hefty, indeed.

Similar taxes are now being contemplated by the legislatures of 30 other states. This could get very, very ugly for Wal-Mart.

You’re probably wondering how a state could single out just one company for such a tax. Indeed, Article I, Section 9 of the US Constitution forbids “bills of attainder” — laws aimed at single individuals. But Maryland has a trick to get around that. The tax is on any firm that has more than 10,000 employees. It’s just sheer coincidence, you see, that Wal-Mart is the only company in Maryland with more employees that doesn’t already spend 8% on employee health care.

The idea is to force Wal-Mart to spend more on health benefits. But until and unless it does, the tax dollars will go to the government of Maryland, not Wal-Mart’s workers. And even if Wal-Mart ends up doubling its health expenditures, chances are that will just end up causing Wal-Mart to pay lower wages in the future than it would have otherwise.

Think about it. A company pays its employees a compensation package that consists of cash plus benefits, and in total is an amount that’s fair for the work that’s being done. If a law comes along that forces the company to pay out more for benefits, that doesn’t change the total value of the package if wages subsequently go down.

Wait, haven’t I contradicted myself? If total compensation isn’t going to change, then how is Wal-Mart going to get hurt by this new tax? How would the company be hurt even if 30 more states adopted it?

The answer to that is simple — and sad. Wal-Mart would be hurt because its employees would be hurt. Right now 1.3 million Americans have chosen voluntarily to work for Wal-Mart because, overall, they like the package of wages and benefits that they get. If laws are passed that force Wal-Mart to offer benefits instead of cash, it will be harder for Wal-Mart to attract and retain workers.

For example, consider the fact that Wal-Mart employs a disproportionate number of older Americans — people in retirement from their lifetime work, looking to pick up a little extra money or just something to do. Those people are already on Medicare, so why should they give up a penny of wages for Wal-Mart health benefits that they don’t even need?

If Wal-Mart finds it more difficult to attract and retain workers, then it could always simply pay more. But that’s easier said than done. Wal-Mart is a low-margin player in a ruthlessly competitive field. As things stand now, the company only earns profits of about $6,000 per employee (which means, by the way, that employees make much more money on Wal-Mart than Wal-Mart makes on Wal-Mart). If wage costs go up even a little bit, margins that are razor thin already start to vanish altogether.

If that happens, then Wal-Mart stops growing. Instead of adding more than 100,000 new jobs every year as it currently does, it will someday add none. Those lucky enough to get a job at Wal-Mart will make a few extra bucks. But the company that now does more than just about any other to provide entry-level jobs for young, unskilled Americans getting started in their working lives will become a closed door.

The other reason why Maryland’s tax is so dangerous for Wal-Mart is that it’s not really about health benefits at all; rather, it’s about unions. Wal-Mart has successfully resisted unionization, and it’s been able to do so by keeping its nonunion employees so happy that they don’t feel the need for collective bargaining. So the unions are doing everything they can to make things hot for Wal-Mart, including lobbying state legislators to punish the company with new taxes under the guise of improving employee health care.

The ultimate downside for Wal-Mart isn’t just a new tax — it’s the potential unionization of its workers. Set aside whatever noble principles you may have about the virtues of unions. The reality is that Wal-Mart has become the colossus that it is because of its genius for streamlining and efficiency, computerizing and modernizing every single element of the “value chain” that comprises today’s retailing. The inflexibility of union labor is, simply, anathema to Wal-Mart’s whole business model, and would in the end destroy it.

So here we are, seriously talking about threats that could destroy America’s largest employer, and decimate billions of dollars of shareholder wealth. And the ultimate irony is that theses risks are all being set in motion under the banner of improving health benefits that are already excellent.

Yes, it’s true: Wal-Mart already pays about as much, per worker, for health benefits as the average retail company. And more than 80% of Wal-Mart’s employees are eligible for those benefits, compared to about 60% for the average retailer.

Do you really think American innovation has improved since federal and state governments went after Microsoft on antitrust grounds? If you ask me, the technology economy was a heck of a lot more vibrant back in 1999 when Microsoft was still, supposedly, a monopoly. Its stock price sure was.

This is no different. The retail economy won’t be any better when government is done destroying Wal-Mart. Shareholders better watch out!

The above is an “Ahead of the Curve” column published January 13, 2006 on SmartMoney.com, where Luskin is a Contributing Editor.