The Mexicans are coming, and they are going to take away our Social Security. So say the latest warnings from anti-immigration alarmists. But as with previous claims that immigrants are going to take our jobs and live on welfare (how could they do both?), this is much ado about nothing.

The hysteria results from the release of the details of an agreement negotiated between the U.S. and Mexico more than two years ago, though not yet implemented. The agreement text was released last week after a Freedom of Information Act request from the TREA Senior Citizens League. Under the agreement, known as “totalization,” citizens of the United States or Mexico who live and work in the other country could qualify for Social Security benefits they earn while working there, and receive those benefits even after they return to their home country. In some cases, they could even combine credits earned in both countries to qualify for benefits.

There is nothing particularly unusual about this agreement. The U.S. has been negotiating totalization agreements since 1978, and currently has similar arrangements with 21 other countries. Americans have generally been the biggest beneficiaries of totalization, because they are more likely to work for multinational corporations and split their careers between the U.S. and foreign countries.

As the anger of anti-immigration zealots attests, the only reason why this is an issue is that it’s an agreement with Mexico. If this were the U.S.-Ruritania Totalization Agreement, we wouldn’t hear a thing. Indeed, we signed a similar agreement with Japan in 2005 without any accompanying hysteria.

Yet this agreement has absolutely nothing to do with immigration, legal or illegal. It concerns Mexicans working legally in this country and Americans doing the same in Mexico, our second-largest trading partner. It would not change current law prohibiting payment of Social Security benefits to people living illegally in the United States. Even if illegal immigrants were someday given a path to citizenship, under the Social Security Protection Act of 2004, they would still be prohibited from receiving credit for Social Security taxes they paid while working illegally.

In the agreement’s first five years, fewer than 40,000 people would qualify for Social Security benefits. The five-year cost to the system would be about $525 million, a pittance-especially when you consider that its current unfunded liabilities exceed $15 trillion.

In fact, Social Security’s actuaries say that the agreement’s financial impact would be negligible even if they underestimated future recipients by 25 percent! The agreement’s big winners are American workers living in Mexico, who will save at least $140 million in Mexican Social Security taxes.

Social Security faces a financial crisis, but it has nothing to do with totalization, or for that matter with Mexican immigrants. In the short term, immigration benefits Social Security, increasing the labor force and payroll tax revenues. And in fact, without immigrants, Social Security might already be running a deficit.

Social Security clearly needs to be reformed. Getting hysterical over totalization won’t help.