Moedas, whose term ends on 31 October, along with the rest of the commission led by Jean-Claude Juncker, is the commissioner for science and innovation.

"It has always been for me a reason for great satisfaction to witness all the praise that I heard from all my colleagues and the enormous recognition that throughout Europe I found of the excellent work undertaken by Carlos Moedas," the Socialist leader told journalists.

"As prime minister I also want to thank the impeccable way that we have always maintained a very close relationship,” he said, in reference to the fact that Moedas was appointed five years ago by Portugal’s previous, right-of-centre government. “Always respecting the independence appropriate for a European commissioner, Carlos Moedas was a tireless defender of the Portuguese and Portugal, in all circumstances."

Costa said that the country “owes a lot" to Moedas, whose work he described as "absolutely essential" in "some very difficult circumstances" that it had to cope with "in the last four years".

For his part, Moedas thanked Costa for the "extraordinary loyalty" and "personal confidence" that he said he had showed him.

"An institutional relationship with the Prime Minister that always went so well, because, at the bottom, our relationship was above parties,” he said. It was Portugal, I always fight to represent Portugal as best as possible."

The outgoing commissioner also welcomed the development of science in Portugal in the last five years, which he said was to "a little" extent his legacy, with a significant increase in funding for science.

"When I arrived [in Brussels, Portugal] only had around five hundred million euros in science funds [that year], when I leave my position as European commissioner, it will already be in the billions. That's a little my legacy."

After the meeting, Costa held another with Elisa Ferreira, who the government has nominated to replace Moedas on the commission that is to be led by Germany’s Ursula Von der Leyen.