Grigor Dimitrov has avoided an upset in the second round of the Madrid Open with a three-set win over Romanian wildcard Marius Copil.
Copil, who is ranked 164th in the world, took the opening set 6-4 before 12th seed Dimitrov clinched the second 6-3 to level the closely-fought encounter.
Both players held serve in a nervy decider to force the tie-break, but it was the Bulgarian who eventually came through 9-7 to move into the next round.
Dimitrov will now face sixth seed Tomas Berdych for a place in the last eight of the tournament.