Marcelo Rebelo de Sousa was speaking to journalists after a visit to the armed forces hospital in Lisbon.

"Although with moderate optimism, I am convinced that the free vote of the British will be for remaining [in the European Union]", the head of state said. If they decide to leave, he added, "that is an opportunity for the European Union to give a sign of vitality".

Instead of having a "complex" about the UK's departure, he argued, the EU should "take further what at this moment has been in the middle of the bridge, waiting" and deepen the political union, economic union, monetary union, digital union and banking union, as well as showing more solidarity and being closer to its citizens.

"I hope that all that happens with the United Kingdom [still] inside" the EU, he added.

Recalling that on Monday he had welcomed the president of the European Council, Donald Tusk, to Portugal, Rebelo de Sousa said that he told Tusk that it was very important that the UK did not leave, stressing that it is "an important country, an important economy and Portugal's oldest ally."

Asked what the consequences would be for Portugal of the UK's leaving the EU, de Sousa said that it "would be bad for everyone": the UK, Portugal and the EU.

With two days to go before the referendum, the poll of the last six polls show 'leave' and 'remain' in a dead heat.