The United States survived its first real challenge of the 2019 Women's World Cup. Barely.
Rapinoe's second spot-kick in the 75th minute, which was upheld after the tournament's latest bout with VAR, ensured that the USWNT will meet fellow World Cup favorite France in the quarterfinals on June 28 in Paris.
The U.S., now unbeaten in 14 consecutive World Cup matches, started the contest on the front foot. Only five minutes had elapsed when winger Tobin Heath was taken down inside the penalty area to give Rapinoe her first chance from the spot. The veteran made no mistake, smacking home a low effort to the right of goalkeeper Sandra Panos.
Those expecting the United States to steamroll the Spaniards from there were in for a surprise, though.
Some sloppy play out of the back - goalkeeper Alyssa Naeher and Becky Sauerbrunn conspired to turn the ball over right on the edge of the box - allowed Hermoso to pull her side even. A perfect strike from the Spanish star eluded the outstretched arm of Naeher and found the top corner in the ninth minute.
Though the top-ranked U.S. controlled the tempo of the match and looked more threatening going forward, Spain held its own, even enjoying some long spells of possession in the second half. Hermoso and Co. couldn't fashion any more opportunities of note, however; Spain finished the match with just the one shot on target.
The decisive moment of a physical encounter came in the 75th minute when Rapinoe got another chance from the penalty spot after a divisive foul call. Rose Lavelle, one of the standout players on the day, was clipped on the shin inside the area, and though the contact looked slight, a lengthy VAR review upheld the call, and Rapinoe grabbed her brace.
Panos came close with a dive to her right, but she couldn't get a hand on Rapinoe's powerful effort.
Prior to the VAR check, Alex Morgan was poised to take the penalty, but the 33-year-old Rapinoe was ultimately entrusted with the job.
Jill Ellis' side will need to be sharper against the host nation later this week, and will no doubt be met by a hostile environment in the French capital.