(CNN) -- The rise of Brazil as an economic force has brought with it a policy challenge familiar here in the United States: immigration.
Recently crowned the world's sixth-largest economy, Brazil has become an immigration magnet, both to low-skilled workers --some of whom enter illegally -- and high-skilled workers looking for opportunities in the country's thriving sectors.
Brazil historically has been welcoming to immigrants, but the challenge now is more pronounced as the government seeks to accept foreigners while protecting its hard-won prosperity.
The country faces two simultaneous challenges: how to deal with recent illegal immigration, mostly from Haiti, and how to make it easier for highly educated immigrants to get work permits. A number of Brazilian ministries have either proposed or are deliberating policies as the country ushers in a new era of immigration.
"You cannot become the sixth economy in the world with impunity," Defense Minister Celso Amorim, a former foreign minister, said recently.
Before, people left Brazil to chase a better life, he said. Now, the tide has turned.
"Naturally, we have to study how to act during this new situation. It's not just Haitians, but Brazilians who are returning. We have to try to exercise the same humanitarian spirit that's present in Haiti (where Brazil leads a U.N. mission), and in a manner that compatible with our means," Amorim said.
In 2011 through September, Brazil processed 52,353 work permits to immigrants, a 32.8% increase over 2010.
Brazil's needs and wants have created the situation where there are ideas to limit the entry of some immigrants and entice the entry of others.
In recent decades in Brazil, the education levels of the population have increased significantly, said Ernesto Amaral, a demographer and professor at the Federal University of Minas Gerais, Brazil.
In that period, an increase in the number of educated workers meant more competition for jobs and a negative impact on wages, he said.
"But this negative impact is decreasing because we have the demand for skilled labor in Brazil," he said.
In other words, Brazil's boom has created an environment where the demand for high-skilled jobs is now outpacing the growth of Brazil's educated workforce.
To meet this challenge, Brazil will have to ramp up its education efforts even more.
"Immigration is important in the short run. We need these workers in Brazil right now," he said.
At the same time, an opposite effect is happening for low-skilled work, Amaral said.
The percentage of low-educated Brazilians is decreasing, but the demand for low-skilled labor is decreasing faster, he said.
Amaral summed up the way that Brazilians, usually welcoming to immigrants, see this development: "We want to help these low-skilled people, but there is a limit."
Facing with illegal immigration from Haiti, Brazil's National Council on Immigration agreed this month to provide 1,200 work visas per year to Haitians affected by the 2010 earthquake who emigrate to Brazil.
The work permits will be good for five years, a period during which the immigrants will find jobs and apply for extensions, or will return home. Unlike other work visas in Brazil, applicants need not have a job contract in hand when they arrive.
Under the plan, those immigrants already in the country who entered illegally will be "regularized."
Unlike the United States, where illegal entry by low-skilled workers is often viewed as a threat, Brazilians are extolling the positives such newly-legalized immigrants can bring.
"For example, the Haitians speak French and could be useful in the cities where the World Cup games will be held," Labor Minister Paulo Roberto dos Santos Pinto said.
The country's justice secretary, Paulo Abrao, is another immigration cheerleader.
"Brazil can be an example to the world of an immigration policy that is open and democratic that reflects our historical welcoming tradition," he said on Twitter this week.
He continued: "Immigrants add cultural value to Brazil and collaborate in the development of the nation."
In addition to providing visas for the Haitians, the health department offered 1.3 million reais (U.S. $745,000) for healthcare for them.
But pleasantries aside, Brazil has an economy to protect, and the work visas might signify a closing of a door rather than an opening.
"The attempt to grant visas is an attempt to limit and control the number that come, rather than being generous and open," said Albert Fishlow, professor emeritus at Columbia University and the author of "Starting Over: Brazil Since 1985."
The approach toward immigration by Brazil and the United States isn't that different after all, he said.
"Both countries want to benefit from advances in technology and both countries want to attract people who are relatively skilled and have an opportunity to contribute to that," Fishlow said.
As for low-skilled immigration, there are other forces raising opposition to their entry.
The Haitian immigrants are arriving mostly to the western states of Amazonas and Acre, in the heart of the Amazon rain forest. A debate of great importance in Brazil currently is how to protect the Amazon. This is the larger issue behind the immigration debate, Fishlow said: will the Amazon be less protected with an influx of newcomers?
Meanwhile, the country's Secretary of Strategic Affairs has created a team that will propose a new national immigration policy wit emphasis on high-skilled workers.
One reported proposal would create two "lines" for foreigners applying for work visas in Brazil. One for highly-educated applicants, and one for everyone else.
The coordinator for the project, Ricardo Paes de Barros, declined to speak to CNN about the commission's deliberations.