HELSINKI (Reuters) - Any move by Finland to join NATO would need public approval via a referendum, President Sauli Niinisto told a panel debate on Monday ahead of elections in January.

Finnish President Sauli Niinisto addresses the 72nd United Nations General Assembly at U.N. Headquarters in New York, U.S., September 20, 2017. REUTERS/Eduardo Munoz

The Nordic country is a member of the European Union but has stayed outside the NATO military alliance in line with its tradition of avoiding confrontation with Russia, with which it shares an 833 mile (1,340 km) border and a difficult history.

It has forged closer ties with NATO in recent years, however, sharing information and taking part in military exercises, reflecting concerns in Finland about the Ukraine crisis and increased East-West tensions in the Baltic Sea.

Niinisto, who is expected to easily win a second six-year term in the Jan. 28 election, did not indicate whether he favoured joining NATO but said a decision to apply for full membership would require a referendum.

“I am convinced that (membership) decision would require legitimacy, a wide acceptability... I would warn against making decisions where a significant part of citizens would get deep wounds,” Niinisto said in a panel discussion in Helsinki.

Only 21 percent of Finns support joining NATO, while 51 percent are opposed, a poll by YLE showed in February.

Niinisto, 69, who will stand as an independent candidate after previously representing the conservative National Coalition Party, is known for cultivating good relations with Russian counterpart Vladimir Putin.

Finland’s president is in charge of foreign and defence policy together with the government.

Nils Torvalds, the only one of seven presidential candidates who advocates joining NATO, said politicians needed to show leadership on the issue.

“The thesis of a referendum blocks the discussion on membership. Everybody’s waiting for a referendum and are not taking a stance on the real question ... We do have a parliament to decide on issues.”

“To apply for a membership when a crisis is knocking on the door, forget that. The membership must be applied for when the weather is still rather beautiful.”

Torvalds, a politician for Swedish People’s Party of Finland, had 1 percent support in a recent opinion poll while Niinisto had 76 percent.

Finland’s centre-right government has said it will monitor the security situation in the region and retain the option of joining NATO.

Russia, which has opposed NATO’s eastward expansion has said any move by Helsinki to join would be of “special concern”.