West Ham have been linked with a move for Baumgartlinger.
The 27-year-old midfielder has been tracked by the Hammers for much of the second half of this season, but no move will now be possible, as he has agreed a new four-year contract with Mainz, as per the official club website.
Austrian media outlet Sportnet commented on the links with West Ham earlier this season, claiming that they were keen to sign him on a free transfer this summer, when his contract expired.
The East London are looking at a replacement for Alex Song, and they had highlighted the 27-year-old Austrian international, who has 36 caps to his name.
He has made 28 appearances for Mainz this season, including in the Europa League, and has certainly shown a good enough talent to impress in the Premier League.
Song looks set to depart the Boleyn Ground this summer, with his loan deal expiring and a return to Barcelona planned, meaning West Ham are keen on signing a top level holding midfielder.
Baumgartlinger could have been that star, available on a free transfer, but having agreed a new deal, it appears as if the Hammers will have to look elsewhere for their key transfer target.