As a provider of financial security systems, Spanish tech company Realsec might easily have fallen victim to the country's banking crisis and economic slump. Yet Realsec is currently enjoying double-digit growth in revenues thanks to new clients in Latin America.
Eighty percent of its revenues now come from overseas, compared with 20 percent in 2009. Staff numbers are up from 15 in 2007 to 32 now, and CEO Jesus Rodriguez is searching for new premises: his offices overlooking Real Madrid's football stadium are getting too small.
"In 2007, Spain was our primary market, but that froze in 2009," he said. "If it hadn't been for our presence abroad, it just wouldn't have been possible to keep going."
Realsec points to a glimmer of hope for the euro zone's fourth largest economy, even though the International Monetary Fund expects Spain to remain in recession through much of 2013. As domestic demand has slumped, some companies have converted themselves into exporters.
Latin American markets have been a prime target for Spanish companies because of their language advantage, and giants such as Telefonica and Banco Santander have increased their exposure there to compensate for problems in their domestic market.
Spanish exports have shot up around 40 percent since 2009; and in the first 10 months of 2012 Spanish exports to Latin America rose 18.5 percent over 2011, more than for any other region.
In July last year Spain registered its first current account surplus - net money inflows from trade and other sources - since August 1998, and it posted another current account surplus in October. Net exports were forecast by the European Union to contribute 2.7 percentage points to GDPgrowth in 2012, compared with minus 4.4 percentage points for domestic demand.
(Read More: Spain Seeks Investment From Latin America)
Spain's export success is one of a few green shoots around Europe. In Ireland, some businesses are benefiting from falls in wage levels, while the country's plunge in land prices has encouraged a new wave of foreign direct investment. In Italy, businesses have applauded the way the government loosened rigid employment rules in the hope that it will lead to more investment and hiring.
None of these things mean Europe's economic crisis is over. Governments are still grappling with how to encourage growth while paying down debt. But taken together, they offer some hope that the past few years of pain may be having some positive impact.
"Better exports reflect to a large extent an improvement in competitiveness - falling labour costs, better productivity, lower wages," said Pier Carlo Padoan, chief economist at the Organisation for Economic Co-operation and Development, the Paris-based think-tank. Nevertheless, the OECD says the short-term outlook for the euro zone's weaker economies remains poor. "The euro area will be in recession till the end of the year, and unemployment is rising still," Padoan said.
Realsec's domestic business was doing fine until 2007. Cheap credit fuelled a ballooning housing market, and the Spanish economy was growing faster than the rest of Europe.
That boosted business for financial institutions, which needed Realsec's encryption systems for secure credit card payments and ATM transactions. More business came from the Spanish government, which wanted to secure online pension payments and benefit applications against hackers and would-be identity thieves.
But exposure to the banking sector made the company vulnerable to changes in the property market. So when talk began to circulate in 2007 that Spain's housing boom might soon end, CEO Rodriguez started looking for new customers.
He got advice and financial help from a government agency, PromoMadrid, and paid for a study into the feasibility of doing business in 22 Latin American countries. For the next two years, as the financial crisis accelerated, Rodriguez and three associates traveled to make contact with potential finance clients in Mexico, Chile, Colombia, Peru, Venezuela and Brazil.
"I realized we couldn't have all our eggs in one basket," he said. "We spent two years travelling in these countries. I'd visit a potential partner, talk to him, see if the information we'd been provided was really the situation on the ground. During this time we were investing everything we could."
(Read More: Winter of Discontent Looms for PIIGS: Goldman Sachs)
Investing in a region experiencing rising use of credit cards and internet banking paid off. Realsec has been growing at around 20 percent annually in recent years: it had total revenues of 4.2 million euros in 2010 and 5.5 million euros in 2011, and is expecting 6.7 million euros for 2012. Rodriguez is targeting annual revenues of 9 million euros by 2015, with 90 percent from outside Spain.
Other companies are starting to realize the potential, he said. "Just a couple of years ago, there was no one in Mexico. The other day I went in to a bank in Mexico and there were three Spanish companies there, all of which had been working there for more than three months."
Impulsa, a small Andalusia-based construction firm, has diversified into Mexico and Colombia, as well as Algeria. "We now survive just because of our foreign business," said founder and CEO Ismael Mora Avila.
New investment could provide a further boost, as Spain's 26 percent unemployment rate puts downward pressure on wages and adds to its allure as a low-cost production base. In the World Economic Forum's Global Competitiveness Index, Spain has risen to rank 36 in 2012-2013, up from 42 in 2010-2011.
In November, French carmaker Renault said it would increase production and create 1,300 jobs in Spain, where average hourly labour costs are two-thirds of those in France, according to Eurostat. The deal would "benefit from the competitive performance reached through the recent workforce negotiations", Renault said at the time.
The previous month, Ford Motor Co said it would close a factory in Genk, Belgium - where average hourly labour costs are nearly twice Spain's - and transfer its production to Valencia in Spain. "Costs are definitely playing a role" in the investment decisions, said Greg Fuzesi, euro area economist at JP Morgan.
To be sure, Spain still has the worst short-term growth prospects among big European economies. Even if the export uplift lasts, economists caution that it won't fix the country's economic problems on its own. Unemployment is painfully high. An estimated 1 million homes remain unsold after the property market crashed. Solving such problems will require a recovery in domestic spending, something that looks several years away.
"Export growth is sustainable," said Adrian van den Hoven, director of international relations at Business Europe, a Brussels-based lobby group. "But it doesn't resolve unemployment quickly, so there are social problems that could remain."
Nor will many other firms be getting assistance from PromoMadrid, the state agency that helped Realsec expand overseas. It's been told it will be closed as part of the government's austerity measures.