The Russian world number three, seeded second at the elite WTA event, broke the Spaniard twice in a closely contested first set that featured several lengthy baseline rallies and lasted almost an hour.
Sharapova then broke the Spaniard's serve twice more in the second set, sealing victory in one hour 40 minutes when her 21st ranked opponent hit a forehand long.
"That was a tough match," Sharapova told reporters after winning her third round encounter on a sunny afternoon at the Indian Wells Tennis Garden. "She's a quality player and she's capable of playing really good tennis.
"She's dangerous. She's beaten top players in grand slams before. She has a really solid game, a lot of variety, but she can hit the ball, as well. I certainly had some trouble today."
Sharapova, who landed her fourth grand slam singles crown at last year's French Open, knows she needs to raise her game a few notches if she is to win her first WTA title of the season at Indian Wells.
"There are a few things I definitely want to improve for the next one (match), but I was happy I got through on not a great day," said the former world number one, who lost in the semi-finals at the Australian Open in January and also in Doha.
The statuesque Sharapova, champion here in 2006, will next face Spaniard Lara Arruabarrena-Vecino, who pulled off a minor upset by beating 14th-seeded Italian Roberta Vinci 2-6 6-4 6-4.
Third seed Agnieszka Radwanska of Poland was also given a tough workout, overcoming Romania's Sorana Cirstea 6-7 6-3 6-4, but fifth-seeded Czech Petra Kvitova advanced smoothly with a 6-2 7-6 win against Lesia Tsurenko of Ukraine.
Sixth-seeded Italian Sara Errani had to work a little harder than the 6-3 6-1 scoreline reflected as she beat Sweden's Johanna Larsson to improve her win-loss record for the year to 20-7.
Errani, who clinched the seventh WTA title of her career in Acapulco last month, broke her opponent's serve twice in the opening set and three times in the second to win in one hour 21 minutes.
"The score was 6-3 6-1 in the end, but for sure it wasn't that easy a match," said the 25-year-old Italian, who is known for her doubles prowess.
"Many of the points were very long and she's a very strong player. It was a much tougher match than the score."
Errani, who reached her first grand slam singles final at last year's French Open, was delighted to become the first WTA player this season to post 20 match wins.
"For sure I'm very happy about that," Errani said with a smile. "I like competition much better than practice, so I play a lot of tournaments and a lot of matches. For the moment I'm doing well."
In other matches, Czech Klara Zakopalova overcame Slovakia's Dominika Cibulkova 6-4 7-5 and Russian Maria Kirilenko scraped past American qualifier Mallory Burdette 6-3 4-6 6-2.
- Sports & Recreation