A "motivated" Eugenie Bouchard beat Maria Sharapova - the woman she called a "cheat" - in a marathon three-setter in the second round of the Madrid Open.

Bouchard criticised Sharapova as she made her comeback from a 15-month drugs ban at the Stuttgart Open in April.

The Canadian finally came through a brutal encounter 7-5 2-6 6-4 after almost three hours on court.

"I was inspired because I had a lot of players coming up to me privately, wishing me good luck," said Bouchard.

"They were players I don't normally speak to and I got a lot of texts from people in the tennis world that were just rooting for me. I wanted to do it for myself, but also for all these people."

Eugenie Bouchard and Maria Sharapova exchanged a brief handshake after the match

Bouchard will play Angelique Kerber, who is set to replace Serena Williams as world number one, in the third round.

"Some girls in the locker room were coming up to me and really wishing me good luck which doesn't normally happen," added the world number 60.

"It showed me that most people have my opinion and they were just maybe scared to speak out."

Speaking after Sharapova made her return from a ban for the use of meldonium in Stuttgart, Bouchard said: "She's a cheater and I don't think a cheater in any sport should be allowed to play again.

"I think from the WTA it sends the wrong message to young kids: cheat and we'll welcome you back with open arms.

"I don't think that's right and she's not someone I can say I look up to any more."

When Bouchard's comments were put to her, Sharapova said that she was "way above" responding.

Bouchard jumps for joy after her victory in Madrid

'So-called comeback'

Though there was no apparent frostiness between them as they entered the court and knocked up, what followed was a fluctuating and full-blooded encounter in which both players refused to give ground.

With breaks exchanged in the first set, Bouchard looked to have blown a huge chance in the 11th game when she missed a forehand into open court with Sharapova stranded.

But the former Wimbledon finalist recovered to take her fourth break point at the end of a 12-minute game and served out to win a first set that last for 70 minutes.

Sharapova, though, found an extra gear in the next stanza, winning four straight games to take the second set as mistakes crept into Bouchard's game.

The decider was a sapping affair, with each player coming from 0-40 down to avoid being broken - in Sharapova's case, the Russian did it in successive service games.

A third save from 0-40 was too big an ask for Sharapova, but even then it was not decisive for Bouchard, who surrendered her serve in the next game.

But, from 40-15 up, Sharapova was broken again and, in the next game, Bouchard took her second match point for her first victory over the five-time Grand Slam champion at the fifth time of asking.

After two hours and 51 minutes, the players exchanged the briefest of handshakes at the net.

"She said 'well played'," said Bouchard. "And I think she's been playing really well in her so-called comeback, if you want to call it that."

For Bouchard, this represents her biggest win and best run at a tournament since reaching the semi-finals in Sydney in January, while Sharapova still has work to do secure a place in Wimbledon qualifying.

"I think I would be worried about myself if I sat here and said I'm pretty happy with losing a tennis match, no matter who I face, no matter what round it is, whether it's the first round or final of a Grand Slam," said Sharapova.

"I'm a big competitor. What you work for so many hours every single day is to be on the winning end of matches.

"Today was just not that day. Of course, I'm disappointed. That's what's going to make me a better player. That's what's going to win me more tournaments and more Grand Slams."

Sharapova and Bouchard leave the court after a match which lasted nearly three hours

Analysis

BBC tennis correspondent Russell Fuller

Two hours and 51 minutes full of fabulous and often ferocious rallies - and ultimately a surprising winner. Bouchard has been in horrible form, but she played here with the confidence she showed en route to the Wimbledon final of 2014, and did not seem remotely fazed when Sharapova ran away with the second set.

Bouchard then remained on the front foot when she appeared for her media conference: choosing to detail how many good luck messages she had received from unlikely sources prior to the match.

The defeat leaves Sharapova some way adrift of direct entry into the Wimbledon main draw. She will need to reach the semi-finals in Rome next week to make sure. And a first round defeat could cost her a place in qualifying unless the All England Club steps in with a wildcard.

Andy Murray v Marius Copil in the Madrid Open round of 32 will be live on BBC Radio 5 live sports extra on Tuesday from 16:00 BST.