So sweeping and complex is the immigration bill set for a final vote this week in the U.S. Senate that it will bring an unintended bonanza for one American constituency: the thousands of immigration lawyers who will be hired to interpret it.

Many of them began gathering in San Francisco on Wednesday for an annual conference to talk shop about America’s immigration code, a hefty tome that could soon get even weightier.

And while most law school graduates don’t choose the immigration practice if a big salary is their aim, the bipartisan immigration bill is like a “permanent pension plan for immigration lawyers,” said New York attorney Sam Udani.

It is not just the millions of illegal immigrants looking for expert help to qualify for a proposed 13-year citizenship path, or the Silicon Valley tech companies navigating through new rules for hiring foreign workers.

No, Udani said, “the place where the money is going to be made is E-Verify,” the electronic worker verification that would become mandatory for all U.S. employers.

Udani is among the 4,000 members of the American Immigration Lawyers Association gathering this week at the Hilton hotel in Union Square. Their profession has changed and greatly expanded with each new immigration overhaul since the 1950s.

Membership in the association grew by 11 percent in recent months amid the rising talk of reform.

Some are looking to ride the expansion of employment-based immigration, where attorney fees can range from $2,000 for a temporary tech worker’s application to more than $20,000 for a wealthy investor trying to secure a green card.

Still, humanitarian concerns and a search for a noble profession, not money, drive many immigration lawyers.

Younger attorneys “tend to be pretty idealistic and get into the field in order to help people who are in trouble,” said Crystal Williams, director of the lawyers’ association. “And there’s not much more trouble you can get into than being in deportation proceedings.”

Few immigrants fighting deportation have the means to hire qualified legal help, so the nonprofit organizations that offer free or low-cost assistance are gearing up to assist the millions living in the country illegally who could qualify for a provisional legal status and eventual citizenship. Many community organizations and foundations hire their own attorneys, in part to steer immigrants away from dishonest lawyers and consultants looking to make easy money.

“Immigration law is a very complicated area — it’s more complicated than the tax code,” said Angelo Ancheta, a Santa Clara University School of Law professor. He directs the school’s community legal clinic, where students help represent human trafficking victims and other vulnerable immigrants.

For many foreigners hoping to stay in the United States, “it’s not essential that you have a lawyer, but it’s a very paperwork-heavy, very mazelike system,” he said. And the consequences of making a mistake can be disastrous.

Money is rarely the motive for the 40 percent of the group’s lawyers who take on asylum or deportation cases, Williams said. The arena “is certainly not lucrative … but it’s very human,” she said. “People who like practicing immigration law like it mostly because of the clients, because of the people they’re helping.”

Few professors taught immigration law when Williams graduated from law school in 1982, and the immigration attorneys’ group was still a tiny one focusing on an arcane niche of American jurisprudence. Today, the organization counts nearly 13,000 members.

And although passage of an immigration overhaul will create new business, it will also take some away, she said. More than half of the association’s lawyers spend time helping families sponsor relatives for green cards, but the bill would halt immigration opportunities for siblings and adult children.

Still, the reform measure will be a boon to thousands of immigration lawyers, especially those representing corporate clients.

But not all of the association’s members believe what is good for the profession will be good for the country.

“Why are they supporting this? They see dollar signs,” said Kenneth Rinzler, an association member since 1992 and frequent critic of the group’s leadership and lobbying. “You’re creating all these new regulations. The lawyers are going to benefit.”