MADRID -- The Spanish words, beginning with "muchas gracias," tumbled so easily out of Mayar Sherif on Monday, drawing shouts and applause from the patrons at Caja Magica.

“I love Spain,” she said in an on-court interview, conducted in Spanish. “It really feels like home.”

Sherif, born in Cairo, Egypt, continues to make spectacular history for her country. She was already the first Egyptian woman to play in a Grand Slam tournament and the first to win a Hologic WTA Tour title.

Here in Madrid, after a cathartic and captivating 6-4, 0-6, 6-4 victory against Elise Mertens, she is the first from her country to advance to a WTA 1000 quarterfinal. She’ll next play No.2 seed Aryna Sabalenka on Tuesday in a first-time meeting.

Sherif is the only unseeded player to make the quarterfinals. How is that possible?

“To be honest,” the 26-year-old said, “I don’t know.”

Maybe because she really is playing at home.

Leaving Egypt at the age of 15, Sherif moved to Spain and lived here for two years. A citizen of the world, she attended Pepperdine University in Malibu, California, played tennis there for three years and emerged with a Bachelor of Science degree in Sports Medicine. Since then, she’s been splitting time between Egypt and Elche, in southeast Spain.

On Saturday, 25 members of Club Campo Elche made the nearly four-hour drive to support her in Madrid -- so many, Sherif couldn’t get enough tickets to accommodate them all. On Monday, there were a few less on hand, but they were no less vocal. Among the onlookers were her mother and father, Amal Thabet and Sherif Ahmed.

Her last match before Madrid came at the ITF W100 event in Oeiras, Portugal, where she lost to No.93-ranked Rebeka Masarova in the semifinals. Here, Sherif won her first-round match when Camila Giorgi retired, then defeated Anhelina Kalinina in the second. In the third round, she faced World No.5 Caroline Garcia.

The same Garcia, who beat Sherif 6-0, 6-4 a few months ago in Monterrey. How did she convince herself that winning might even be possible?

“Last week helped me find a match rhythm,” Sherif said. “Even though I was playing lower-level matches, it gave me confidence by winning. I lost the first set 6-0, but I played better after that.

“This tournament, I was ready for it. I had the mental chip, `OK, I lost the last time and I’m going to try to play with more confidence.’ I believed that I can beat her.”

And so she did, upsetting Garcia 7-6(2), 6-3 her second victory over a Top 10 player. Her first came last year in the Parma final against Maria Sakkari.

On Monday, after winning the first set against Mertens, the No.24 seed, Sherif lost focus and suffered another daunting 6-0 setback. How did she re-set?

“I had to take my time, think that I had to be aggressive to regain my confidence,” Sherif said. “Just by winning one game, that 6-0 was gone.”

Serving for the match at 5-3 in the third, Sherif admitted she was nervous. After going for one drop shot too many, it was 5-4. That was when she called for the trainer to help her cope with lower back pain. The stoppage seemed to cool off Mertens, who quickly faced match point. Sherif threw up a few loopy forehands and, on the last one, Mertens blasted a forehand long.

“It was a good strategy against her because she doesn’t like the high balls -- she likes the balls coming fast at her,” Sherif said. “I know that I’m not easy to play against, especially at altitude. But I know they always think about it and they’re not comfortable. I try to take advantage of that and mix it up.”

Sherif was wearing a gold necklace with a delicate outline of Africa. Appropriately, she’s the second player from Africa after Ons Jabeur to reach the quarterfinals of a WTA 1000.

The victory was popular among the Spanish media, many of whom attended her post-match press conference. There is a toughness about Sherif, a word that she used a number of times in describing her early career in tennis. Leaving Egypt for Spain as a teenager couldn’t have been easy.

Sherif is currently ranked No.59, but her play here seems likely to vault her past her previous career best of No.44. Over the past two years, across all levels, Sherif has crafted a 33-7 record on clay.

“My choice,” she said. “I was crazy to become a professional tennis player. Obsessed with beating people outside of Egypt. Having the belief that I could get to the top.

“Life in Egypt is different. The culture, everything, it’s tougher. You have to achieve more just to get to the court. I grew up in tough conditions, played with a lot of pressure since I was very young. That’s where I got the fighting spirit.”