RICHMOND, Calif. — Carlos Diaz broke the law when he crossed the border and took a job as an office janitor. But he’s not about to break another by failing to pay his income tax.

“I’ve been talking to other people who’ve done it, and I want to follow the law,” said Diaz, an undocumented immigrant from Guatemala who squirmed in his seat at a neighborhood tax preparer’s office.

Tuesday is Tax Day, when millions of illegal immigrants find themselves collaborating with one federal agency — the Internal Revenue Service — while trying to avoid another — Immigration and Customs Enforcement.

They hope a track record of on-time payments will aid their citizenship applications, but critics who favor tougher enforcement of federal immigration rules say it’s absurd for the government to work with people it should be tracking down and deporting. It legitimizes the presence of immigrants who are here illegally, critics say, and sends a mixed message about the country’s interest in enforcing its own rules.

“The word schizophrenic comes to mind,” said Marti Dinerstein, president of Immigration Matters, a research firm that advocates tighter immigration enforcement. “There is something fundamentally wrong about this.”

The IRS created a nine-digit Individual Tax Identification Number in 1996 for foreigners who don’t have Social Security numbers but need to file taxes in the U.S. But it is increasingly used by undocumented workers to file taxes, apply for credit, get bank accounts or even buy a home.

The IRS issued 1.5 million ITINs in 2006 — a 30 percent increase from the previous year. All told, the tax liability of ITIN filers between 1996 and 2003 was $50 billion. The agency has no way to track how many were immigrants, but it’s widely believed most people using ITINS are in the United States illegally.

One number hints at the number of illegal immigrants having income taxes deducted from their paychecks.

In 2004, the IRS got 7.9 million W-2s with names that didn’t match a Social Security Number. More than half were from California, Texas, Florida and Illinois, states with large immigrant populations, leading experts to believe they likely represent the wages of illegal immigrants. Even immigrants who use ITINs to file taxes are forced to make up a Social Security Number when they get a job.

Critics like Dinerstein believe the process makes room for law violators, and in some cases, might endanger the country by allowing them to operate more freely.

“That’s why people who are living here illegally rushed to get ITINS like they’re chocolate candy,” said Dinerstein. “It’s a national security issue.”

Major Market Indices

IRS spokeswoman Nancy Mathis said the ID numbers are issued strictly to track a tax return’s progress through the system, noting the tax code says nothing about whether foreigners filing taxes are here legally or not.

“It serves no other purpose,” she said, “and was never intended to serve any other purposes.”

Nor does the IRS share immigrants’ personal information with ICE or any other agency, Mathis said.

To avoid any resemblance with Social Security cards, the IRS stopped issuing cards and instead sends a letter bearing the tax ID number. Still, these numbers do end up being put to other uses by a population eager for any form of official ID, and by companies interested in doing business with them.

Many banks now allow illegal immigrants to open an account with their ITIN, and Bank of America has a pilot program in Los Angeles that allows customers to use the numbers to sign up for a credit card. Others have created mortgage products for ITIN-bearing immigrants, including Citibank, which offers one in partnership with ACORN Housing Corp.

“They want to go forward, work, be a normal taxpayer,” said Erica Gonzalez, a staffer in ACORN’s Fresno office, where demand for the tax ID has shot up in recent years. “If they want to establish themselves here, this lets them do that.”

Five states — West Virginia, Kentucky, New Mexico, Utah, and Illinois — also allow ITINs to be used as identification for a drivers’ license.

“The IRS never anticipated this phenomenon,” said Dinerstein. “They thought it was going to be some boring tax compliance number.”

To Ben Johnson, director of the Immigration Policy Center at the nonpartisan American Immigration Law Foundation, the widespread use of tax ID numbers is another sign that the immigration system is broken.

“The U.S. economy hangs a huge ’help wanted’ sign at the border, and they come to work, not to hide,” he said. “A lot of people struggle with the idea they’re here without permission, and want to find a way to operate legitimately, like a normal hardworking person.”

Judging by the crowded waiting room at Esteban Ramirez’s modest tax preparation office in Richmond, where a television blared Spanish-language soap operas, it’s clear undocumented immigrants are growing increasingly comfortable around a Form 1040.

Some are interested in getting refunds, like the approximately 80 percent of tax filers who get them each year. Although ITIN users don’t qualify for the Earned Income Tax Credit, which could give a break to an American earning in the same bracket, they can get other tax credits, and can use ITINs to claim dependents in Mexico.

At the end of his session with Ramirez, 18-year-old Diaz found he would have to pay, as he’d expected.

The $800 payment is steep, he said. But if it helps him to build a lawful life in the United States — a life he hopes will include his own janitorial business, and in the future, college — it’s worth it.