BRISTOL, England (AP) — England reached the Women's Cricket World Cup final by beating South Africa with only two balls to spare on Tuesday.

Anya Shrubsole hit the decisive boundary to seal a two-wicket win for England, which required two runs from the last three balls of a dramatic semifinal in Bristol, southwest England.

South Africa earlier won the toss and chose to bat. It scored 218-6 off 50 overs after opener Laura Wolvaardt (66) and the unbeaten Mignon du Preez (76) had given the underdogs hope of a shock victory.

But Sarah Taylor set England on its way with 54 before Jenny Gunn (27 not out) and Shrubsole dragged the hosts over the line to 221-8.

England will now face either Australia or India in the final at Lord's on Sunday.