Halep, pushed onto the defensive by a powerful opponent whose default mode always seems to be all-out attack, then crucially saved another break point and was taken to deuce in each of the next two games before wrapping up an engrossing first set with a third break sealed by another sequence of unforced errors from Ostapenko.
The world No. 47 became only the second unseeded woman to win the French Open after Margaret Scriven in 1933 and the first player from her nation - population of about 2 million - to claim a major.
From Halep's point of view her first time out of the gates at a Slam final, she was surrounded by an entourage of around 50 family and friends, and this time she kept it simple - and it nearly worked.
"At some point I was like a spectator on court", said Halep.
Of course I would like to win probably all of the grand slams.
The 20-year-old Ostapenko had never been past the third round at a Grand Slam tournament until this one.
"I think I can not believe I am the Roland Garros champion and I'm only 20 years of age", Ostapenko said. She also denied Halep what would have been her first major championship and the No. 1 ranking.
It was also fitting, on a sultry day at Roland Garros, that she should finish it off with yet another backhand return down the line, one of 54 clean winners she struck in the final.
'And keep it going because you are like a kid.
"I still can't believe I won".
The Romanian looked to be cruising towards the title at 3-0 in the second set but betrayed her emotions by throwing her racket to the clay when Ostapenko stopped the rot after a long game.
Ostapenko continued her feast or starvation style but watched two break points flash by as Halep withstood a sustained assault.
Ostapenko turned the set around with four games in a row and then levelled the match with a forehand down the line - the shot that was doing the most damage. She must have hoped that Ostapenko would freeze on the big occasion but instead the Latvian looked relatively relaxed.
The youngster launched an impressive tally of 299 winners from her fluorescent green racquet.
"I knew the history and on the day I was born, Gustavo Kuerten won his first tour title at Roland Garros".
With much of the pre-match conversation dominated by Halep's improved on-court attitude, Cahill was quick to say he was happy with her composure through the final.
Ostapenko set the tone immediately, disguising any nerves with an array of bruising groundstrokes to break Halep in the opening game.
Ostapenko fired 54 winners and 54 unforced errors compared to Halep's eight and 10 respectively.
"I'm really happy to win here".
The Latvian pulled on level terms at 3-3 and then went ahead with a break thanks to a massive stroke of fortune when her backhand, which was going to land at least a foot wide, caught the net and dropped dead the other side.