Updated

With his future on the line, Jose Miguel Baladura stood in one — a line snaking through a sweltering government office that led to his chance to become an official American.

He, his wife and two small children waited for hours Monday along with hundreds of other immigrants hoping to stay legally in the United States while they wait for permanent residency status.

"I've never done bad things in this country. I've never stopped working," said Baladura, who moved from Mexico six years ago. "I think we've worked hard enough."

Under a federal law that went into effect in December, an estimated 640,000 illegal immigrants were allowed to seek green cards without first returning to their home countries.

The temporary change in the regulations was significant because most illegal immigrants who leave the United States are usually barred from re-entering for up to 10 years.

So illegal immigrants across the country — from Iranians in New Mexico to Mexicans in Boston — made a last-minute rush to take advantage of the law and get their documents stamped by midnight Monday.

In downtown Los Angeles, more than 2,000 applicants lined up outside the Immigration and Naturalization Service building when it opened at 6 a.m., many having camped out all night.

In Miami, Napoleon Gomez, 60, veered his landscaping truck over to the local INS building when he heard on the radio that the law covered any undocumented immigrants. Gomez, who left his native Colombia in 1992 and later married a U.S. citizen, said he hadn't known about the deadline.

"I own property, I pay taxes, I'm married but I'm not a resident yet," said Gomez, as he waited in line with his paperwork. "I've lost a day of work now."

INS spokeswoman Elaine Komis said the agency would not know for several weeks how many immigrants filed applications. But she said petitions from relatives hoping to sponsor immigrants suggest the applications were on a record pace.

For immigrants without a sponsor, marriage to a U.S. citizen can be the fastest route to legal status. One byproduct of the Legal Immigration and Family Equity Act was a rush to the altar in cities with high immigrant populations.

Records for Las Vegas show there were more marriage licenses issued within the past week than for the most recent Valentine's Day — historically one of the city's busiest wedding days.

In Florida, officials in six Miami-Dade offices said they performed 222 three-minute marriage ceremonies — about three times more than the daily average.

"Most of these people have lived hidden lives," said Roberto Reboso, a marriage license official in Miami. "They're undocumented, and this is a great opportunity for them."

The visa application includes a $225 fee and a $1,000 fine for being in the country illegally. On top of that, some people paid lawyers' fees that ranged from $40 to $1,000.

There are several bills in Congress that would extend the provisions and a coalition of labor and immigrant groups planned to rally Tuesday — International Workers Day — in Boston to make the law permanent.

Miriam Stein, spokeswoman for the Massachusetts General Amnesty Coalition, said the law as it stands now tears families apart, especially when the main breadwinner is deported.

"People come here because they flee religious persecution, or they face hardship in their country, like starvation or civil war. They come here for the same reason as people have always come to the U.S.," she said.

People like Verica Madik, who came to America with her husband and young son from a city in war-torn Macedonia. Standing in a line outside a Detroit INS building, she remembered how scared the transition had been.

"It will always be hard. You must be strong. But here, you can work and go to school at the same time and still survive," Madik said. "There are so many opportunities."