The early 19th century brought threats of invasion from Spain, and three actual invasions by the French, who were finally repelled by the combined forces of the Portuguese and British. The enthusiasm of returning British troops for the wines they had enjoyed boosted Portuguese wine sales in Britain yet again.
Despite the ensuing decades of civil and political unrest in Portugal, exports continued to boom, including wines sourced more widely around Portugal.
Then, in the middle of the century, like other countries in Europe, Portugal was afflicted by two major vineyard plagues in succession: first the fungal disease oidium, then the root-munching bug phylloxera. Vineyards were wiped out, the plagues spreading gradually southward from the Douro. For growers and merchants it was a time of great hardship.
As elsewhere in Europe, the final solution was to graft European vine varieties onto the bug-resistant roots of American vines, or to grow hybrids of European and American vine species. These very widely-planted hybrids produced weirdly musky-flavored wine known as americano, to which locals became accustomed. Later on, they were banned for quality wines.