Veteran coach Carlos Queiroz quoted Frank Sinatra, gushed over his players and argued furiously with a critic as he said goodbye to Iran on Monday – and did it his way.

“Now the end is here,” said the 65-year-old Portuguese, who is stepping down after Team Melli’s 3-0 defeat to Japan in the Asian Cup semi-finals.

“I’m very happy and very proud – because I did it my way.”

Queiroz, formerly at Manchester United, Real Madrid and Portugal and now linked with Colombia, has spent nearly eight years with Iran, becoming their longest-standing coach.

However, his tenure ended in bitter disappointment as Iran, previously the team to beat, suffered their sixth semi-final slip-up since they last lifted the trophy in 1976.

Queiroz pointed to the moment of madness which created the opening goal, when five Iran players surrounded the referee while Japan played on and scored.

Iran’s heaviest Asian Cup defeat since 1988 extended a woeful record against their bogey team, whom they have not beaten – and never even scored against – in four meetings at the tournament.

But Queiroz, who has taken Iran to two World Cups, paid emotional tribute to his players, cryptically saying they had given their country a “chance for freedom” during his time in charge.

“They did it for the people,” he said. “They sent a message to the rest of the world that Iranian people deserve to be looked at differently by the rest of the world.”

However, Iran’s 43-year wait for a fourth Asian Cup title has proved trying for many, and Queiroz snapped back at a journalist who asked him to apologise for the defeat.

“What was your role in the last eight years? Your role was silence and complicity, nothing more,” said Queiroz, who confronted his critic after the press conference.

Queiroz’s stint has been troubled in many ways, as Iran struggles for funding and equipment under its nuclear sanctions – including at last year’s World Cup, when Nike withdrew its supply of boots.

In-fighting has also been a major problem and Queiroz has been embroiled in a public spat with Branko Ivankovic, his heir apparent, in recent months.