KRALJEVO, Serbia — Leylah Annie Fernandez clinched a Billie Jean King Cup playoff tie victory for Canada with a dramatic win Saturday.

The 18-year-old Fernandez, from Laval, Que., beat Serbia’s Nina Stojanovic 3-6, 6-3, 6-4 to give Canada an insurmountable 3-0 lead in the best-of-five tie.

Fernandez, ranked 72nd in the world, was about to have her fifth match-point opportunity against the 87th-ranked Stojanovic when some of the lights went out at the indoor hard-court facility.

Stojanovic, with serve and trailing 5-4 in the third set, came back from the 13-minute delay to win a long point. But Fernandez won the next two points to finally put an end to a match that lasted two hours 46 minutes.

Canada won the tie without its top singles player, Bianca Andreescu, who has a foot injury. Gabriela Dabrowski, Canada’s top doubles player, also didn’t play.

A doubles match was to be held later today.

It was the second long match in a row for Fernandez, who needed two hours 34 minutes to beat Olga Danilovic 7-5, 4-6, 6-4 in the opener yesterday.

The 230th-ranked Rebecca Marino, from Vancouver, then gave Canada a commanding 2-0 lead with a 6-4, 7-6 (6) upset against Stojanovic.

The top-ranked Serbian, Stojanovic made 63 unforced errors against Fernandez. The Canadian had 45 unforced errors.

Canada advances to next year’s qualifiers, where a win would secure a berth in the 2022 Billie Jean King Cup Finals.

The Billie Jean King Cup is the new name for the Fed Cup — the top international team tournament in women’s tennis.