Ernests Gulbis has beaten Jerzy Janowicz in three sets to seal his place in round two of the Madrid Open.
The opening set between the big servers was a tightly-contested affair, but it was world number 20 Gulbis who eventually came through a tie-break 7-5.
Janowicz needed just a single break of serve to level the match in the second as he responded positively by taking it 6-3.
However, Gulbis broke early in the third before sealing his progress 6-2 against the Pole.
The Latvian will take on either Italy's Fabio Fognini or Ukrainian Alexandr Dolgopolov in the next round.