Egypt's Mayar Sherif continues dream run in Madrid - Photo: Mayar Sherif official twitter account
Sherif, World No 59, overcame Mertens, who is ranked World number 24, in a thrilling three-set match that ended 6-4, 0-6, 6-4.
Mertens struggled to handle Sherif's clever drop shots and superb court coverage, and was unable to find a way past her inspired opponent.
Sherif's next opponent will be 2nd seed Sabalenka, who will provide a stiff challenge.
Nevertheless, Sherif has already made history in Madrid this week.
Sherif, who will turn 27 on 5 May, has had a stunning run in Madrid, defeating Italian Camila Giorgi (4-6, 6-4 ret.), Ukrainian Anhelina Kalinina (6-2, 7-6 (3)), the No. 30 seed, and French Caroline Garcia, World number 5, in the previous rounds (7-6 (2), 6-3).
Notably, Sherif's historic achievement is all the more impressive given that this is her first main draw appearance on clay at a WTA 1000 event.
She has risen more than 700 places in the rankings over the past 5 years.
(For more sports news and updates, follow Ahram Online Sports on Twitter at @AO_Sports and on Facebook at AhramOnlineSports.)