(Adds quotes, detail)
By Emma Anderson
BERLIN, July 9 (Reuters) - German Chancellor Angela Merkel is to travel to Brazil to watch the national team's bid to win the World Cup for a fourth time, officials said on Wednesday, following its crushing 7-1 defeat of the host country's squad in the semi-final.
President Joachim Gauck confirmed he would also join Merkel in Rio de Janeiro on Sunday for the tournament's final match.
Merkel, a keen soccer fan, watched every goal in Tuesday's match against Brazil, her spokesperson said. German media have hailed the result as a sensation and a miracle.
Germany will face either Argentina or the Netherlands, who play each other in the second semi-final on Wednesday.
"I agree with world opinion that it was a very good game ... I think it almost deserves to be called historic," said Merkel at a news conference in Berlin, adding that she wished the team "a lot of strength and concentration on the task at hand".
The game, which saw Germany score five of its goals within just 18 sizzling minutes, broke a number of records.
According to broadcaster ZDF, the game topped TV ratings with 32.57 million viewers - about 40 percent of the population, not taking into account large public viewings. On Twitter, 35.6 million tweets were posted during the match, making it the most tweeted sports game in the social media site's history.
Merkel attended Germany's first match in the Cup against Portugal and cheered the team on to a 4-0 win. Images of Merkel at the game went viral online, including one of her posing with shirtless German players in the team's dressing room.
Another image of Merkel, 59, with hands raised in the air, cheering on the team has become an Internet "meme", with the chancellor photoshopped as Rio's "Christ the Redeemer" statue.
Merkel, Europe's most powerful political leader, has also been a popular subject of "selfies" with players, including striker Lukas Podolski and midfielder Julian Draxler.
German football fans had mixed opinions about seeing their nation's leader in such images online.
"It's a good PR strategy, I think a lot of people might like it," said 33-year-old Berliner Christian Meyer. "She should do her job instead and not use footballers to improve her image."
In one 2006 newspaper interview, Merkel compared politicians to soccer players: "All I know is that you have to be fully fit at the right time. Then anything is possible. That holds true for football and politics."
West Germany won the World Cup in 1954, 1974 and 1990. (Reporting by Emma Anderson; Editing by Stephen Brown and Gareth Jones)