HAVANA - More than 400 Cubans of Spanish ancestry mobbed that country's stately embassy in Havana yesterday, waiting to apply for citizenship under the newly enacted "law of grandchildren."

Spain has begun accepting citizenship applications from the descendants of people who went into exile after its brutal 1936-39 Civil War, part of a 2007 law meant to address the painful legacy of the conflict and the ensuing right-wing dictatorship of Gen. Francisco Franco.

But a provision approved Friday also allows anyone whose parents or grandparents were born in Spain but went overseas because of their political beliefs or economic hardship to become Spaniards. Those accepted do not have to renounce their current citizenship.

Officials in Madrid have estimated that as many as half a million people worldwide could be eligible to become citizens, although it is unclear how many of those are in Cuba. About 300,000 people in Argentina may qualify.

Spanish authorities have asked applicants to use the Internet to set up a consular appointment, and most potential Spanish citizens in countries outside Cuba were going online instead of heading to the local embassy.

There were a few dozen people lined up at the Spanish Embassy in Mexico City. But that was nothing compared with the tangled and disorganized clumps of would-be Spanish citizens that stretched across a busy avenue and engulfed a small park in Havana, because access to the Web is tightly controlled in this country.

Miguel Carpio, 52, an office worker, said his sister in Miami used the Internet to secure a consular appointment, but he had no choice but to wait in line.

"Maybe we can all see each other there in Spain some day," he said.

Even those who receive Spanish citizenship must wait for permission from the Cuban government to travel abroad, a process that is often slow and arduous.

Carpio says he has no plans to emigrate - at least for now. "I'm just thinking of visiting," he said. "But having the option is very valuable."

Norberto Luis Diaz, 38, was the first person in Cuba to be approved for citizenship under the provisions. A Spanish consular official signed the forms authorizing his passport, and Diaz excitedly hugged his family members moments later.

"I have more Spanish blood than Cuban blood because almost 75 percent of my genes are Spanish," said Diaz, whose grandfather arrived in Cuba in the early 1900s and married a fellow Spanish exile just to be sure he preserved his homeland's citizenship.

Diaz is a cardiologist who began applying for permission to travel to Spain in 2002. Because many Cuban health-care workers have to wait six years for approval to head abroad for extended periods, official Cuban permission to leave came only last week, days before the law took effect - making him the first Cuban eligible.

He said he plans to stay in Spain for several months and has inquired about practicing medicine there, but will one day return to Cuba. "This is my homeland, too," Diaz said.

Because his application was already being processed, he avoided the long line outside the embassy.

The embassy was open only until 4 p.m., and most people in line had no hope of being seen yesterday. Many began to arrange for family members to hold their place night and day for as long as it takes. One of those who reached the front was Yolanda Ruiz, 79; she began waiting Sunday at midday. Relatives waited in shifts for her all night.

"I'm very excited about seeing my 18 cousins," Ruiz said of a possible trip to Spain.