Raducanu went into Wednesday’s match having never won a set against a top 10 player, let alone claiming victory against one.
Pegula was fresh from winning the Berlin Open on Sunday and asserted control early in both of the first two sets.
Despite looking laboured at times, Raducanu managed to claw her way back from 4-1 down in the first before Pegula eventually served it out, while she trailed 3-1 in the second set.
Again she rallied and Pegula had to dig deep to force a tie-break.
The American netted a match point at 6-5, and Raducanu capitalised to take the match to a deciding set, much to the delight of the British crowd.
The 2021 US Open champion grew in confidence, feeding off the support to go a double break up.
But, with a cushion behind her, the nerves started to tell and Raducanu was unable to serve out the match on two occasions as Pegula levelled.
It seemed like a third chance would be wasted, too, but the Briton, who had broken again, fought back from 0-40 before holding her head in her hands in disbelief as she emerged triumphant.