Former world number one Victoria Azarenka saved three match points before winning on her comeback from a year out after the birth of her son.
The two-time Australian Open champion, who gave birth to Leo in December, won 6-3 4-6 7-6 (9-7) against Japan's Risa Ozaki at the Mallorca Open.
It was the 27-year-old Belarusian's first match since losing at the French Open in June 2016.
Azarenka was sixth in the world when she announced her pregnancy last July.
She was a game away from defeat when play was suspended on Tuesday because of fading light.
Inspired to play tennis?
Find out how to get into tennis in our special guide.
But she showed her trademark resilience to twice break 74th-ranked Ozaki's serve when they returned on Wednesday, then going on to fight back from 5-3 down in the tie-break.
Azarenka was given a wildcard to play in the Mallorca Open, which is scheduled to be her only competitive action before Wimbledon.
The former Wimbledon quarter-finalist has used her protected ranking to play at the All England Club in the tournament which starts on 3 July.