The numbers four and five made their exits at the hands of young outsiders with 17-year-old American Melanie Oudin upsetting 2004 finalist Dementieva 5-7, 6-4, 6-3 and Kazakh Yaroslava Shvedova upsetting one-time number one Jankovic 6-3, 6-7 (4-7), 7-6 (7-4) with the Serb mourning Wednesday's death of her grandmother.
The 17-year-old Oudin said that despite some leg pain, she put everything into her serve on match point to end the two-hour, 45-minute contest.
'I thought this match point might be my last chance, so I threw in a really big serve,' she said. 'I had the whole crowd cheering for me - so much support. I was struggling a little with my leg. The whole thing was just amazing. I can't believe I won.
'It hasn't exactly hit me yet, but when I'm in the third round of the US Open in two days, it will be just incredible.'
The beleaguered Safina turned in another patchy performance to just get past Kristina Barrois of Germany 6-7 (5-7), 6-2, 6-3.
It was hit or miss for Safina, troubled by doubts over her status as a world number one who has yet to win a Grand Slam title.
'Another tough day in the office,' said the Russian resignedly after her second modest performance of the week. '... Actually today, I think I was serving in some stages better than the first round.
It's at least already positive - at least I made some aces.'
Ninth seed Caroline Wozniacki restored some order on the day with her hammering of Croatian Petra Martic 6-1, 6-0 while Nadia Petrova, the 13th seed, beat Julie Coin of France 6-4, 7-6 (7-3).