People waited anxiously in long lines throughout the Dominican Republic on Wednesday, eager to submit applications for legal residency before a midnight deadline and avoid possible deportation.

Many had been waiting since the night before, clutching documents they hoped would be sufficient to establish their legal status and allow them to stay in a country that, for some at least, is the only home they have ever known. Nearly all are from Haiti or of Haitian descent.

"I have nothing in Haiti," said Jaquenol Martinez, a sugar cane worker waiting to submit his application under a program to register migrant workers that began a year ago.

Martinez said he has been in the Dominican Republic since he came from neighboring Haiti with his parents as an 8-year-old in 1963. Under the "regularization" program, he should qualify for legal residency, but the Haitian government has yet to provide him with a birth certificate to establish his identity.

Others said they had similar difficulties getting identification from the Haitian Embassy or have been unable to get documents from employers in the Dominican Republic, where many work under informal arrangements in construction, agriculture or as gardeners and maids.

"On my own, I haven't been able to resolve anything," said Delinua Jean-Francois, who said he had been harvesting sugar cane in the country since 1984.

The immigration registration program was supposed to have started in 2004 but it was delayed by legal challenges and didn't begin until last June. Non-citizens must show they have been in the country since before October 2011 to qualify for legal residency.

The law is aimed at regulating the historic flow of migrants from impoverished Haiti to the relatively wealthier Dominican Republic. The government pushed it forward last year amid international criticism of a Supreme Court decision saying people born in the country to non-citizens did not qualify for citizenship under the constitution unless they had at least one parent who was a citizen or legal resident. The ruling rendered thousands effectively stateless. The government said about 50,000 people in this category will be granted citizenship.

The Interior Ministry has said there are about 500,000 people who could qualify for residency under the program. So far, about 250,000 have registered, but officials said only about 10,000 have produced sufficient documentation.

Those who have registered have temporary documents that will allow them to remain while their cases are evaluated. Authorities have said they don't plan mass deportations, but the migration agency has prepared about a dozen buses and set up repatriation centers.

"There is a lot of uncertainty and worry," said Joseph Cherubin, director of an organization called the Sociocultural Movement of Haitian Workers.

Human rights groups say they fear that migration agency officials and the military will deport people arbitrarily if they look Haitian or speak Spanish with a Creole accent as has been done in the past. Associated Press journalists along the border said about 12 people were deported Wednesday, some claiming they had been in the country before October 2011.

Another concern is an estimated 50,000 people who have no documentation at all, including many who were born in the Dominican Republic. Some may qualify to stay but have no way to prove their claim and could be deported to a country they know nothing about.

"It would be catastrophic because they have never been in Haiti, they don't know anyone there, they don't have family," said Chiari Ligouri, a researcher for the Caribbean chapter of Amnesty International. "What would happen with them?"

The Haitian government has cleared a field near the border-crossing point of Malpasse to provide assistance to people who have been deported. That area was deserted Wednesday except for some guards and construction crews.

Some Haitians apparently were unwilling to wait around the find out what will happen: A local TV station broadcast images of what it said were Haitians in vehicles loaded with furniture and other belongings, headed for the border.