Spain storm to historic Women's World Cup win
The Lionesses threw on James and Chloe Kelly after the break to strengthen their attack, but it was Spain that created genuine chances as Caldentey forced a one-handed save out of Earps, while Bonmati blasted over the bar.
In the 64th minute, the ball struck Keira Walsh's hand and the referee awarded a penalty after a long VAR check, but Earps played heroics to save Jennifer Hermoso's attempt.
James tested Spain goalkeeper Cata Coll in the 76th minute, but her attempt was parried away.
Spain remained dangerous into the dying minutes, as Earps provided another save to shield Ona Batlle's deflected strike.
In a desperate bid to create a miracle, Earps rushed into the Spain area for a stoppage-time corner, but it was too late.
This is just Spain's third appearance in Women's World Cup, after having been eliminated in the round of 16 four years ago, and failing to progress from the group stage in 2015.