STUTTGART, July 8 (Reuters) - Germany goalkeeper Oliver Kahn announced on Saturday that he was retiring from international football after his team beat Portugal 3-1 in the World Cup match for third place on Saturday.
He told reporters: 'That was my last international match. It was a beautiful time but you have to know when it's all over.
'The atmosphere was overwhelming. You have to stop and think for a moment what it would have been like if we had won the World Cup.
'It was one of the biggest, if not the biggest, emotional moment that I can remember.
'That was my last international match - and you could hardly ask for a better match to go out on. But you have to know when it's time to go.'
Kahn, who had 86 caps for Germany, was captain of the team that went to the World Cup final in 2002, where they lost to Brazil 2-0. He won the Golden Ball award given to the most valuable player of the 32-team tournament.
But Kahn was demoted by coach Juergen Klinsmann two years ago when he took over.
Klinsmann first stripped Kahn of the captaincy in favour of midfielder Michael Ballack. He also made Kahn compete with long-time understudy Jens Lehmann for the first-choice goalkeeping spot.
Kahn, 37, lost out to Lehmann just before the World Cup. He played in the match against Portugal as a gesture of thanks for his loyalty to the team after being demoted.
Klinsmann paid tribute to Kahn after Saturday's match, praising him for dealing maturely with the decision in favour of Lehmann.
'It's unbelievable how he dealt with that,' Klinsmann said. 'I can only speak about Oliver with the greatest respect.'
Kahn was captain, for the 49th time, on Saturday because Ballack was out with an injury.
He played his first match for Germany against Switzerland in Berne on June 23, 1995 - a 2-1 victory for Germany.
The Bayern Munich captain has been named the world's best goalkeeper three times and Europe's best keeper four times.