When US shut its borders, many flocked to Spain, where immigration policies were more open to Latin Americans and other foreigners.

But now, Spain’s battered economy has caused people, particularly native citizens, to leave in droves.

The number of Spaniards leaving the recession-wracked country was up 44 percent in the first six months of 2012 compared with the same period last year, the National Statistics Institute said Tuesday.

Current estimates show 40,625 Spaniards emigrated between January and the end of June, compared with 28,162 last year, the institute said. Another 228,890 foreigners who had been living in Spain left the country during the six-month period.

The figures are based on municipal censuses.

Spain is in its second recession in three years, with unemployment at near 25 percent. Unemployment among people under 25 years of age and available for work is 52 percent. The economy is not expected to improve before 2014 at least.

Spain's population grew by nearly a fifth to some 47 million in the decade prior to the beginning of the financial crisis in 2008, with millions of foreigners flocking to the country for work. A real estate bubble provided much of the work until it burst in 2008.

Many foreigners are now returning home because work has dried up while an increasing number of Spaniards are emigrating in search of employment.

The institute said that as a comparison, 22,622 Spaniards left in the first six months of 2009.

Spain's population stands at 46 million.

Follow us on twitter.com/foxnewslatino
Like us at facebook.com/foxnewslatino