Japan's pride in its export sector has suffered a dent after trade figures for 2011 revealed that a collapse in sales to Europe coupled with the after-effects of the tsunami on the east coast created the country's first deficit in 32 years.

The ministry of finance blamed the rising cost of oil and gas and soaring currency for much of the last year's ¥2.49tn (£20bn) deficit.

Figures for December showed exports fell 8% from a year earlier, owing partly to weak shipments of electronics parts, while imports rose 8.1%, largely as a result of huge liquid gas shipments to offset the closure of 50 out of 54 nuclear power stations. It marked the third straight month of deficits.

The ministry said the high value of the yen, which became a safe haven currency at the height of the euro crisis, was a key factor in pricing Japanese goods out of foreign markets. The tsunami, which hit production for several months, also drove up demand for oil and gas just as prices hit a post recession peak.

The governor of the Bank of Japan, Masaaki Shirakawa, supported the ministry's view that trade deficits were unlikely to become a pattern, and did not foresee the country's current account balance tipping into the red in the near future.

But analysts warned that Japan's days of logging huge trade surpluses may be over as it relies more on fuel imports and manufacturers move production offshore to cope with rising costs and a strong yen.

A fast-ageing population also means a growing number of elderly Japanese will draw on their savings. Without savers to buy government debt, the treasury will be forced to seek support from outside investors, which will raise borrowing costs and in a few years time force Japan into the same over-reliance on international money markets as Europe.

Japan has amassed debts worth twice its $5tn economy. Around 95% of the total is owned by Japanese banks, insurers and corporates, which have continued to lend to the government despite low returns.

Within the next 10 years the ratio of workers to pensioners is expected to decline from the current 2:1 to 1:1, putting huge pressure on welfare budgets.

"What it means is that the time when Japan runs out of savings – 'Sayonara net creditor country' – that point is coming closer," said Jesper Koll, head of equities research at JPMorgan in Japan.

"It means Japan becomes dependent on global savings to fund its deficit and either the currency weakens or interest rates rise."

David Rea, a Japan specialist at Capital Economics, said the tsunami was a factor in the trade figures, and its effect will likely persist as nuclear power stations remain shut this year, but more fundamental pressures were behind a deteriorating economic picture.

He said the high value of the currency remained a persistent problem for exporters.

He said: "Firms have struggled to adjust to a strong yen that has appreciated by around 9% in trade-weighted terms since the start of the year. In the short term, the effect on trade will be small as many Japanese exports are priced in the importers' currency. However, in the medium term it will make production in Japan less competitive, and will lower the value of repatriated profits. This will further encourage firms to shift production abroad."

High wages and welfare costs are also a feature of Japanese business life, a factor that has spurred many Japanese companies to locate factories overseas in recent years.

Goldman Sachs said a more detailed examination of the export figures revealed an especially pronounced falloff in exports to Europe, which declined 13.1% following an 11.2% decline in November. "This suggests the deterioration in financial conditions in Europe may be having a negative impact on demand there," it said.

Exports to Asia also slumped while they grew slightly to the US over the year.

The chief cabinet secretary, Osamu Fujimura, said the government wants to closely watch the trend of exports and imports. "There are worries that the yen's strength is driving Japanese industry to go abroad," said Fujimura. "We have to create new industries … implement comprehensive steps to boost growth. It is important to secure employment within the nation."

Only four of the country's 54 nuclear power reactors are running due to public safety fears following the March disaster.