* Santander to buy 8 pct Bank of Shanghai stake from HSBC
* Deal, including cooperation agreement, worth 470 mln eur
* Bucking the trend as big rivals sell out of China
* Santander says eyeing China trade flows with Latam
By Sarah White and Matt Scuffham
MADRID/LONDON, Dec 10 (Reuters) - Santander,Spain's largest bank, is to buy HSBC's 8 percent stakein Bank of Shanghai, just as many international rivals arebeginning to sell out of China.
Santander, which already has a consumer finance venture inChina as well as a car financing business, said on Tuesday theBank of Shanghai deal also included a cooperation agreement,taking the value of its investment to 470 million euros ($647.3million).
Several major U.S. and European banks including Bank ofAmerica and Switzerland's UBS have startedshedding their Chinese holdings for a variety of regulatory andbusiness reasons.
HSBC, meanwhile, has been selling minority holdings as partof a restructuring since the start of 2011. It has cut 46,000jobs and sold or closed 52 businesses, including a minoritystake in Chinese insurer Ping An.
But Santander said it would help state-controlled Bank ofShanghai, which it said had 98 billion euros of assets and wasthe second-biggest city-focused commercial and retail bank inthe country, with training in areas such as risk management.
It is also planning to develop a joint wholesale bankingbusiness, adding to what Santander might be able to offer someof its big corporate clients in Latin America, a key hub thatprovides around 50 percent of its profits.
"Santander is also developing investment banking activitiesin China, mainly based on financing the substantial trade flowsbetween the Asian giant and Latin America," the bank said in astatement which listed existing ventures in China.
Asia-focused HSBC said China was still one of its prioritymarkets and Chief Executive Stuart Gulliver has said in recentmonths that its 19 percent stake in Bank of Communications remained core.
"Our priorities ... will emphasise the growth of our ownoperations in mainland China and our own partnership with Bankof Communications," Peter Wong, chief executive of HSBC Asia Pacific, said in a statement on Tuesday.
JOINT VENTURE
Gulliver had said in May that HSBC could sell its Bank ofShanghai stake for between $500 million and $600 million.Santander declined to comment on Tuesday on how much it had paidfor the 8 percent stake alone.
Santander also has 20 percent of Bank of Beijing's consumerfinance subsidiary and earlier this year launched a 50/50 jointventure in car financing with Anhui Jianghuai Automobile (JAC).
Peers have been selling out of China in part because somestruggled to make quick progress with their Chinese jointventures, and also because they are bulking up capital ahead ofmore stringent international solvency rules.
Santander's main rival in Spain, BBVA, recentlytrimmed its stake in China's CITIC Bank Corp to justunder 10 percent, as having stakes in foreign banks will becomemore expensive over that limit under new capital regulations.
Santander has sold assets elsewhere in recent years,including in Latin America. But it has been in a moreacquisitive mode in recent months, even in its home marketSpain, which is slowly emerging from a five-year economic slump.
In October it spent 140 million euros on a 51 percent stakein the country's largest consumer finance business, run bydepartment store chain El Corte Ingles.
Santander said it expected its deal with Bank of Shanghai toclose in the first half of 2014. It said the transaction wouldimpact its capital to risk-weighted assets ratio by about 0.01percent.
Bank of Shanghai was reported earlier this year to beplanning to list its shares in Hong Kong within the next 12months, though it was not immediately clear if the Santanderdeal would influence those plans.