This country's companies are building your roads

The past seven years have seen Spain experience huge hardship, with crippling austerity, huge job losses, and home repossessions all taking their toll as the country became one of the biggest casualties of the euro zone's economic crisis.

And while the Spanish economy seems to be in the first stages of recovery, with the European Commission predicting GDP growth of 2.8 percent this year, and 2.6 percent next year in its European economic forecast for 2015, the country's unemployment rate is lagging the economy, at nearly one in four, according to Eurostat.

Read MoreThe big question bugging Europe

One Spanish sector, however, is thriving. Some of the world's largest and most ambitious infrastructure projects are either being overseen or being carried out by Spanish companies -- from the high-speed rail link between Mecca and Medina to Manhattan's East Side Access tunnel and the widening of the Panama Canal.

Stacey Newman | E+ | Getty Images

The reason that this particular part of the Spanish economy has prospered while the rest of Spain has struggled to bounce back from a massive housing market crash and recession can be found nearly 50 years ago.

"The origins of this actually quite extraordinary success can be dated back to the late 60s and 70s, when Spain began to build toll roads," William Chislett, Associate Analyst at the Elcano Royal Institute, a Madrid based think tank focusing on international relations, told CNBC in a phone interview.

Read MoreThis country is trying to go cash-free

Chislett added that while other countries used state-owned companies to build their toll roads, many of the companies that worked on Spanish infrastructure – much of which was built to accommodate a burgeoning tourism industry – were private.

When the oil crisis struck in the 1970s, the Spanish government offered to buy back shares in the toll roads. "The companies decided to hang on to them because the concessions… were long term, which tends to be the case on toll roads," Chislett said. "The economy got back on an even keel and the roads became profitable," he added.

The expertise gained by these Spanish companies served them well as European countries established closer ties both politically and economically.

"After Spain joined the European Community – now European Union – in 1986, (and then) the euro zone in 1999 as one of the founder members, many companies, not just infrastructure ones… wanted to expand abroad," Chislett said.

"They could see opportunities, and also they were on the defensive because Spain was now up for grabs – people could move, companies were able to invest much more easily in Spain," he added.

Today, these companies are winning contracts across the globe. According to a 2014 report by Spain's Ministry of Foreign Affairs and Co-operation, Spanish companies had, "a portfolio of international projects that tops €74 billion ($83.6 billion)."

Read MoreWhy big business and colleges are teaming up

The breadth and reach of Spanish companies in projects around the globe is considerable. Ferrovial, for instance, is working on the Crossrail project in London, and an upgrade of almost 20 kilometers of the Pacific Highway in Australia. OHL Group, via Czech subsidiary OHL ŽS, is undertaking the €1.5 billion Ural Project, which will see a 390km rail line built between Obskaja and Nadym in Russia.

Chislett said that companies who might ordinarily have suffered and collapsed as a result of Spain's recent economic woes were protected, in part, because of their continued success abroad.

"Those companies… haven't had to lay off people, haven't folded," he said, before adding that, "Lots of small construction sectors in Spain have collapsed, but the big boys, ACS, Abertis, Sacyr, OHL… they've gone from strength to strength."

Does the success of these companies abroad have any impact on the Spanish economy at home, though?

"It hasn't created that many jobs in Spain, (but) obviously it has created some, because Spaniards are often contracted and sent to abroad to work on these projects," Chislett said.

What the success of these companies has given Spain is prestige and a sense of pride during one of the country's toughest periods in recent memory.

"It's part of the Spain brand," Chislett said. "It's a country now that can say, 'we're not just a country that produces oranges, and bullfights," he added.

The contracts look set to keep coming. At the beginning of June, Madrid based ACS Group announced that it was part of a consortium awarded the contract for the construction of Toronto's Eglinton Crosstown light metro line.

"As long as the projects are out there they will go on bidding for them," Chislett said. "What share of the business they get, who knows, (it) depends on what conditions they present, but… it's certainly not a sector that looks like dying tomorrow."