ROUEN, France -- Staring down defeat, the French Fed Cup team pulled off a determined comeback to reach their sixth Fed Cup final on Sunday over Romania, after winning the fourth singles match and the decisive doubles clash in their Fed Cup World Group semifinal tie.

An intense live doubles rubber took place in the last match, and it was erstwhile partners Caroline Garcia and Kristina Mladenovic who re-teamed to claim the clinching point, with a razor-thin 5-7, 6-3, 6-4 victory over Simona Halep and Monica Niculescu. France will now face Australia in the Fed Cup final in November, as the Gallic group seeks a third trophy to go alongside their wins in 1997 and 2003.

Read more: Barty, Stosur outlast Belarus to send Aussies to Fed Cup final

World No.2 Halep had started the day by putting her Romanian squad one match away from advancing to their very first Fed Cup final, after she outlasted Garcia in an epic 6-7(6), 6-3, 6-4 encounter to give Romania a 2-1 lead over France.

France's Pauline Parmentier, though, steeled herself when she needed to most, and leveled the tie at two matches apiece, with a 6-3, 2-6, 6-2 victory over Irina-Camelia Begu, sending the weekend to the live doubles rubber, which Parmentier's teammates won.

Halep had won five of her six previous meetings against Garcia, but the reigning Roland Garros champion was greatly challenged by the World No.21 on the clay courts of Rouen in the first match of the day. Halep, however, stayed steely down the stretch to slide past Garcia after a grueling two hours and 57 minutes of play.

Garcia used her fabulous forehand to hang with Halep, blasting 28 of her 40 winners from that side. Halep, however, claimed six of her eight break points, while Garcia was a less successful 4-of-13 when she had break opportunities. Moreover, Garcia was undone by 59 unforced errors, which was 26 more than Halep's miscue total.

In the first set, Garcia got off to a flying start, completely dominating the opening stages to take a 4-0 lead on the World No.2. However, Halep’s groundstroke prowess kicked into high gear at that juncture, and the Romanian pulled all the way back to 4-4. Halep then used strong returns to win a fifth straight game and go up a break for the first time.

Serving for the set, though, Halep faltered from 30-0 up, double faulting to give Garcia a glimmer of hope in the game, then watching as Garcia powered shots through the court to lead to a break for 5-5. Garcia then held for 6-5 with a wily dropshot as the Frenchwoman took another turn to lead in the set.

Garcia held two set points at 6-5 before Halep scratched out a service hold to queue up a tiebreak. In the tight breaker, Halep moved to a set point of her own with a forehand winner at 5-5, but aggressive play by Garcia let her win her two service points and lead 7-6. Halep punched a backhand into the net on Garcia’s third set point, and France had a set in the bag.

Halep started the second set with a streak of her own, racing to a 3-0 lead. However, the Garcia forehand resumed its ferocity, and the Frenchwoman leveled the set at 3-3. Halep, though, put herself in prime position once again, as a down-the-line backhand by the Romanian finally pierced exceptional Garcia defense to attain a crucial break for 5-3.

Serving for the second set, Halep was forced to battle out of a 0-30 hole before maneuvering to two set points with winning down-the-line backhands. Garcia saved both, but a third set point came Halep’s way after a long return by the Frenchwoman, and Halep converted that chance with a forehand winner down the line.

The players moved into the decider, where Halep was forced to save break points in her first two service games before gritting out holds. Another tense service game for the Romanian was closed out with two forehand winners as she held for 4-4.

Finally, Halep claimed the initial break of the final set, taking Garcia's serve for a 5-4 lead with a forehand winner on the sideline on break point. Garcia's forehand helped her get to 15-30 at match game, but Halep would not be denied, and blasted through the final three points of the tilt to close out a tremendous victory.

In the fourth rubber, Parmentier took the first set without facing a break point. The Frenchwoman claimed the initial lead by breaking for 3-1, after Begu netted a backhand on the third break point of a lengthy game. Parmentier held onto that lead throughout, converting set point after Begu fired a forehand miscue wide.

But Begu struck back by taking the second set. It was the Romanian’s turn to break for 3-1, blasting a deep forehand to force an error from Begu on break point. Parmentier dropped serve for a second time to cede the second set, double faulting twice in the final game.

Parmentier, however, took the immediate lead in the decider, striking a divine angled forehand to force an error from Begu and claim the Romanian’s opening service game. Parmentier was pumped as she excitedly galloped through her service games, punctuated with a love hold for 4-2.

Begu was broken for 5-2 after she turned her ankle while down break point as a return winner whizzed past her. After treatment, Begu returned to the court, but Parmentier remained unfazed and finished off her victory to level the tie at two matches apiece. Parmentier won 80 percent of her first-service points as she clinched the win in two hours and four minutes.

Like the other World Group semifinal between Australia and Belarus, the France/Romania tie would be decided by a live fifth rubber in doubles. And in the first set of the doubles match, it was the magic of Monica Niculescu which took command.

31-year-old Niculescu usually held firm at the net and carved her typical wily shots, including a dropshot return winner to break the French pair for 6-5. Serving for the set, Niculescu hit a breathtaking lob winner to reach triple set point, and converted her team’s second opportunity with another lob.

But the French pair of Garcia and Mladenovic eventually found the footing that brought them to the French Open doubles title in 2016. An overhead by Garcia put them up 3-1 in the second set, and Garcia fired a crosscourt backhand for a second break and a 5-1 lead. The French duo gave one break back but was able to finish off the set with a Mladenovic volley.

With one set for all the marbles, the tennis got extremely tense. Both Garcia and Halep had to survive service games in which they faced three break points, en route to a 4-4 deadlock after no breaks had occurred. Eventually, in that game, the French pair broke through on Halep’s serve, as a Mladenovic return winner brought up break point, where Halep double faulted.

Leading 5-4 in the third set, Garcia served for the tie, and fell behind 15-30 after another zesty Niculescu volley. But powerful deliveries from Garcia pulled her and her partner through to match point, which Garcia converted with another big serve, concluding the match after two hours and 37 minutes of scintillating battle.