Stuttgart, Germany, 14 June 2017 | AAP

Bernard Tomic has ended a three-tournament run of first round exits with an opening-round victory in Stuttgart, the German city where he was born.

The win over French journeyman Stephane Robert, was not simple for the struggling Australian however.

Tomic eventually prevailed over the world No.139 6-1 5-7 6-2 but not before blowing a seemingly unassailable lead in spectacular fashion.

Tomic was leading Robert 6-1 5-1 when unforced errors kicked in, allowing the Frenchman to reel off six straight games and send the match to a deciding set.

Thankfully for Tomic – who had just five wins and 12 losses this year coming into the match – he steadied himself and hit a series of forehand winners to close out the match in the third.

The win on his favourite grasscourt surface has put the Australian, now ranked 48th in the world, after slipping from No.26 at the start of the year, into the second round where he will face Tomas Berdych.

Berdych, the 2010 Wimbledon finalist and current world No.14, had a first round bye.