France took fifth spot in the final ranking of the EHF EURO 2014 with a 26:25 (16:13) win over Hungary in a rollercoaster match in Budapest on Friday.
They held the upper hand through most of the game, but a late scoring run from Hungary meant the home side came very close to almost taking the win.
"I'm happy that we finished with this victory and that we don' t go home sad," said France's centre back Allison Pineau.
"Although, in my opinion we should be in the semi-finals; we deserved it. But that is sport, it is important to always fight and to be better in the next championship."
The match began with messy defence from both sides with most goals in the first half scored through easy close-range shots.
The newly-introduced line-up with Gabriella Toth starting in centre back worked well for the home side.
The 18-year-old directed play and worked well with Krisztina Triscsuk, Hungary's top scorer with 10 goals.
France were easily the dominant side during the first half however, at one stage holding a five-goal lead (13:8), but Hungary managed to reel in a little before half-time.
Hungary experimented with several defensive systems, none of which seemed able to prevent France from finding their way to the six-metre line again and again.
The home side's goalkeepers were forced to step up and keep France at bay as their defence struggled.
20-year-old Blanka Biro made impressive saves that put her on a 44 per cent save rate at the end of the match and won her best player for Hungary.
Biro was instrumental in Hungary closing the score line, and the first period ended with a three-goal difference of 16:13 to France.
The second half was neater and more even than the first, but France remained in control for the first 15 minutes as Hungary fought to catch up.
Inspired by Biro's performance, Hungary's defence finally began to work and by midway through the first half, the hosts were trailing by just one goal at 19:18.
With 10 minutes remaining a fast break by Aniko Kovacsics equalised for the first time at 22:22 and France suddenly found themselves in trouble.
A right-wing goal from Monika Kovacsicz took Hungary to the lead at 22:23 inside the last ten minutes, much to the approval of the crowd in Papp Laszlo Sportarena.
But France quickly levelled the score and a tense last eight minutes followed.
Goals were scored one for one until a fast break goal from French right wing Alexandra Lacrabere put the final point on the board, sealing France's victory.
"If somebody told us before the tournament that we would finish sixth, we would be satisfied," said Hungary's left wing Aniko Kovacsics.
"But after having played a really good games against all these strong teams maybe we could have finished even better."
Centre back Estelle Nze Minko was awarded France's best player and was the top scorer for her side with seven goals.