Having conceded a goal just after half-time, his side were heading for a defeat which would have meant a drop to the second division before they roared back to floor Hoffenheim when the German league season finished on Saturday.
Wolfsburg’s Wolves were rescued when Croatia striker Mario Mandzukic netted twice before Brazil striker Grafite scored a third to seal victory. The result means the 2009 champions avoid relegation by just two points and finish 15th – just above the relegation places.
Magath maintains his proud record of having never been relegated despite four close shaves, having also won the Bundesliga title just two years ago with Wolfsburg and twice while coach of Bayern Munich.
The 57-year-old also avoided relegation with Hamburg, in 1995-96, Eintracht Frankfurt, in 1999-2000 and VfB Stuttgart, in 2000-01.
“It’s been dramatic,” admitted Magath, who only took over as Wolfsburg coach in March after ex-England coach Steve McClaren was sacked with his side sliding down the table. I just now feel very relieved and empty.”
“The tension was incredibly high. We fell behind early in the second half and because of the other results, it meant were were effectively relegated, so this is a tremendous relief.”
There was drama in the build-up to kick off as Wolfsburg’s Brazil midfielder Diego stormed out on the team after being dropped for the final game.
The 26-year-old play-maker, who has won 33 caps for Brazil, walked out of the pre-match team meeting after being told by Magath and then refused to travel with the team to the Wolfsburg stadium.
The Brazilian, who signed for €15 million from Juventus in August, now has an uncertain future at the club and is set to be at least heavily punished following his tantrum.
“I’ve never experienced anything like this in my career, I did not try to reason with him,” said Magath.
“Initially, we wanted to build a new team around him next season, but after what has happened, we’ll see,” said Magath, who is a notorious disciplinarian.
The bad-boy Brazilian, who has a history of disciplinary problems, has also fallen off-side with his team-mates. “This action by Diego, before such an important game, is inexcusable,” said Wolfsburg captain Marcel Schäfer. “To do such a thing and leave before a big game, that’s just not on.”
After Wolfsburg finished 15th, Eintracht Frankfurt and St. Pauli are the two teams to be relegated.
Borussia Mönchengladbach end the season 16th and face a two-legged play-off against the side who finish third in the second division side.