GETTY IMAGES NORTH AMERICA/AFP/File / CLIVE BRUNSKILL |
Florida native Stephens, who has now won all six finals she has competed in, had been determined to win the last tournament at Key Biscayne before it moves next year.
However a nervy final was not easy on the eye with both players appearing to be struggling to get to grips with the occasion.
There were eight breaks of serve in the first set alone, with French Open champion Ostapenko hitting 29 unforced errors and US Open champion Stephens making just three winners.
It was the first time either player had made it to the final of a WTA Premier Mandatory event and Ostapenko, at just 20 years and 297 days, was the youngest finalist in Miami since Victoria Azarenka won here in 2009.
Ostapenko came into the encounter having not lost a set, an impressive statistic considering she has taken part in five tie-breaks over the last 12 days.
Stephens however, who was raised in Plantation, Florida and was able to call on overwhelming support here, made the stronger start, breaking in the first game.
But serving for the first set with just 36 minutes on the clock, nerves began to hit the American who double faulted to give Ostapenko a breakpoint which she duly won when Stephens hit hopelessly long.
Ostapenko's serve, however, continued to falter and the 13th seed responded immediately with a fourth break to give herself another chance to win the opening set.
Yet another hopeless service game - at this point Stephens had been successful with just 18% of her second serves - sent the match into a tie-break which was won when the Latvian sent a backhand into the net.
Unsurprisingly, the trend continued with both players broken in the opening two games and when Ostapenko faltered again, Stephens took a 3-1 lead, and this time, she kept on her game to emerge victorious for the sixth title of her career.
What the stars mean:
★ Poor ★ ★ Promising ★★★ Good ★★★★ Very good ★★★★★ Exceptional