* Europe's second biggest carmaker faces lower cost rivals
* Restraining wages essential but not enough, industry says
* Industry wants more state investment in freight transport
* Car plants need to secure future by expanding into R&D
MARTORELL, Spain, Nov 22 (Reuters) - While much of the European car industry is in dire straits, Spanish assembly plants are raising production, winning new models and creating jobs despite years of recession.
But Spanish manufacturers must expand into research and development while the state needs to improve transport links, despite its deep financial problems, if Spain is to remain Europe's second-biggest carmaker and beat lower cost rivals such as the Czech Republic, industry officials say.
At the moment, at least, the outlook is bright. Grey-shirted assembly line workers at Spain's biggest car factory live in a world apart from outside the factory gates, where one in four is unemployed and countless others fear for their jobs.
At the Martorell plant near Barcelona, headquarters of the Volkswagen-owned Spanish brand SEAT where production rose seven percent last year, workers assemble five different models on a moving carousel.
"Nobody talks about lay-offs here, nor has anyone been fired," said assembly line worker Pedro Pastor, a 30-year-old father who has worked for SEAT for 10 years. "In contrast, a lot of my friends are on the dole and can't find work."
Just as Mexico has a thriving motor industry making vehicles for much of the Americas, its Spanish counterpart is prospering despite the depressed domestic economy by keeping labour costs down and targetting stronger European markets.
A six-year sales slump and aggressive discounting across much of continental Europe have badly hurt mid-range manufacturers. PSA Peugeot Citroen, one of the worst affected which lost 5 billion euros ($6.73 billion) last year, said on Thursday it may close an assembly line at its Mulhouse plant in eastern France unless production picks up.
Martorell, which makes the top-selling SEAT Ibiza and Leon models, illustrates the robust state of Spain's car industry. Spain's biggest export market is France, which is showing signs of a sales recovery, followed by Germany which avoided the worst of the euro zone crisis and relatively buoyant Britain.
The industry created over 2,400 Spanish jobs in the first six months of this year as foreign firms including Ford and even Peugeot Citroen opened production lines, investing 3.5 billion euros in just over a year.
With Spanish unemployment at 26 percent, unions keen to protect jobs have accepted flexible work practices and salary freezes, which together with close links to a world-class domestic car parts industry have helped to attract the orders.
Spain has no domestically-owned car makers - Volkswagen bought SEAT from the state in 1986 - but the overall industry accounts for 10 percent of economic output and employs 9 percent of the workforce.
UNIONS LEAD THE WAY
Spanish car industry wages are around the European average and similar to those in Italy. However, the unions have led the way in agreeing to practices such as their members working more hours when a big order comes through, and then taking time off owed to them when assembly lines lie idle.
"Spanish unions are signing the best collective bargaining contracts in Europe with multinational companies," Treasury Minister Cristobal Montoro told Reuters this week.
Unions have adopted measures that would have been unthinkable a few years ago, such as twin-track salary scales where new workers get paid less for doing the same job as existing employees.
Many of these measures, like deciding collective wage agreements at each company rather than across the entire industry, have become enshrined in law by the centre-right government's labour reform last year.
Salary freezes have meant wages in the sector have lagged inflation by around two percentage points over the past two years, unions estimate. Average assembly line workers' wages are between 1,900 to 2,000 euros per month, unions say, still above the average Spanish salary.
Spain is expected to continue to attract car orders over the next two years, with factories predicted to work at 85 percent of capacity in 2015, up from 68 percent in 2012, according to consultant IHS Automotive.
By contrast, Italian factories are forecast to operate at only 59 percent in 2015, compared with 48 percent last year.
But labour costs make up barely 10 percent of a vehicle's cost and the industry wants a better freight network to allow production to be shipped more efficiently to its major markets.
"Restraining wages is not enough, it's essential, but it's not enough," said Mario Armero, executive vice president of Spanish car makers' association ANFAC. "Improvements must be made in transport links."
Compared with labour costs, transport has an equal or greater weighting in Spain, says business consultants PwC. This is an important concern for a country which exports nearly 90 percent of its car production.
Successive Spanish governments have invested heavily in passenger transport to benefit the tourist industry, like the high-speed AVE high-speed train network, rather than freight.
"Infrastructure in Spain has been geared more towards the transport of people rather than goods," said the head of Citroen in Spain, Alfredo Vila, whose factory in the northwestern city of Vigo was recently assigned the production of the new C4 Picasso.
The government has promised to invest 112 million euros in integrating seaports with road and rail links. But big spending projects are likely to be delayed while the state makes sweeping cost cuts to meet tough budget deficit targets.
Government spending on public works fell 11 percent in the first nine months of this year, official data show, on 2012 investment figures that had already hit an all-time low.
NOT JUST A WORKSHOP
European competitors such as the Czech Republic, where labour costs are half those of Spain's, are closer to the main markets including Germany. Martorell is waiting for Volkswagen to decide whether to build a SEAT sports utility vehicle (SUV) at the plant or at its Czech subsidiary Skoda.
Bringing research and development to Spain will make the industry less dependent on production lines, officials say.
Hopes are pinned on a growing number of Spaniards at the top level of car makers, including Volkswagen board member and head of procurement Francisco Javier Garcia Sanz and Jose Vicente de los Mozos, who is executive vice-president of manufacturing and supply chain at Renault.
"Spain shouldn't just be a workshop," said PwC car industry expert Manuel Diaz. "We should have more research and development, because that is what makes production sustainable and creates an industry around fabrication."