Mainz came from behind to beat Stuttgart at the Coface Arena to move above their opponents in the Bundesliga table and break into the top six.
Martin Harnik was credited with Stuttgart's opening goal, although Mainz goalkeeper Heinz Muller helped turn the forward's header into his own net in the 48th minute.
The home side, who had dominated proceedings in the first half and did not deserve to be behind, responded well with a brace from Nicolai Muller before Elkin Soto wrapped up victory with the last kick of the game.
Stuttgart striker Vedad Ibisevic had lost his four previous visits to Mainz and there was no early indication his latest trip would end in a more favourable manner.
The hosts took the initiative from the beginning with Andreas Ivanschitz seeing his shot blocked in the ninth minute before he set up Muller, whose strike from a tight angle was saved by Sven Ulreich.
The ball fell back out to the Austrian striker, who was denied again by an excellent save from Ulreich.
Ivanschitz and Adam Szalai both sent shots off target as the home side continued to press in search of an opening goal which simply would not come in the first half.
When it did arrive in the 48th minute, it came at the other end of the field with Muller turning Harnik's header into his own goal after the Stuttgart striker was picked out beyond the far post near to the goal line.
Stuttgart's lead lasted just seven minutes before Muller restored parity.
He first spread play for Zdenek Pospech, who returned the favour to set up the Mainz forward to beat Ulreich with a rather fortunate shot.
The goal gave Mainz belief once again and Szalai and Muller both combined well to cause the Stuttgart defence problems
Unsurprisingly, that pair combined for Mainz's second goal in the 71st minute with the Hungarian beating Georg Niedermeier in the air to send Muller through, and he nudged the ball past Ulreich before ensuring it crossed the line.
Deep into stoppage time, Soto added a third to seal victory with a powerful shot from a tight angle, which Ulreich got his fingertips to but could not keep out as it flew into the roof of his goal.