MADRID, Feb 16 (Reuters) - Spain's exports grew 23% in 2022 to a record 389 billion euros ($416.50 billion), though the increase did not prevent the trade deficit from doubling to 68 billion euros because of a rise of prices and volumes of energy imports.
Exports of goods and services represented almost 42% of Spain's gross domestic product (GDP) and were a key driver of the economy's 5.5% growth in 2022.
The Ukraine invasion upset the dynamics of foreign trade, with companies scrambling to address inflationary pressures and seek new markets and suppliers for commodities after disruptions of trade flows from Russia and Ukraine.
The energy trade deficit accounted for 77% of the overall deficit, at 52.6 billion euros. However, energy imports slowed in the last quarter of the year, reflecting weak domestic demand and slightly lower international prices.
The trade deficit was the deepest since 2009.
Trade increased with almost all regions, except Russia as a result of sanctions, and Ukraine, China and Algeria.
The fall in business with China was prompted by lower pork exports from Spain after the world's biggest pork consumer overcame an epidemic crisis in its own herd that had forced it to buy meat abroad in 2020 and 2021.
Exports to Algeria have effectively dried up since June, when Algiers blocked Spanish companies' bank accounts in retaliation for Spain's new stance towards Western Sahara.
Around one billion euros in exports were lost, according to ministry figures. Spain continued to import gas and oil from Algeria worth 7.6 billion euros, an increase of 60% from previous year.
Exports to Ukraine fell, but imports to Spain of cereals from the war-torn country grew 84% on the previous year.
The increase came after difficulties getting agricultural exports out of the country at the start of the war were resolved by the establishment of a Black Sea corridor in the summer.
($1 = 0.9340 euros)