In a historic runoff election on Tuesday, former Dallas County sheriff Guadalupe “Lupe” Valdez, who grew up in San Antonio as the daughter of Mexican migrant workers, secured the Democratic nomination for governor of Texas. Her victory over Houston businessman Andrew White was expected, and her chances of defeating incumbent governor Greg Abbott seem low, but she becomes the state’s first Latina and openly gay candidate to secure a major party gubernatorial nomination.

In a tighter-than-expected contest, Valdez was declared the winner when she secured 52.8 percent of the vote to White’s 47.2 percent, with nearly 83 percent of the state’s 6,978 precincts tallied. Turnout was low, at 2.49 percent of the state’s 15,249,541 registered voters, despite a heavy voting presence in the March 6 primary. Valdez’s candidacy comes at a time when Democrats nationally, discontented with President Donald Trump, are hoping to make a significant impact on the balance of power in Washington and when women, in particular, made major inroads on the ballot in Texas and elsewhere. History was also made Tuesday in Georgia when Democrats nominated Stacey Abrams for governor: she’s the first black woman in U.S. history to win a major party nomination for the office. The depth of the disillusionment in Washington has many hopeful that a Blue Wave will sweep into office nationally and extend into deep-red Texas, which hasn’t elected a Democrat statewide since 1994. But Texas Democrats are largely focusing on Beto O’Rourke, the congressman from El Paso, whose underdog campaign has gained surprising momentum—and funding—in his bid to unseat incumbent Republican U.S. senator Ted Cruz. (O’Rourke and Cruz secured their parties’ nominations outright in March’s primaries.)

Initially, Valdez, who served four terms as sheriff, was viewed as the ideal candidate to oppose Abbott. Her heritage, her law-enforcement background, and her sexual orientation were considered attributes that would ignite the Democratic base—particularly Hispanics—and provide Valdez a platform to challenge the incumbent governor’s strong stance against illegal immigration, which is often characterized as anti-immigrant overall. Abbott and Valdez have been political rivals before. When Valdez was sheriff, she initially refused to honor requests by federal agents to hold undocumented prisoners and release them into the custody of immigration agents. Valdez would honor so-called detainers only if the inmate had been charged with a violent crime. This position drew heavy criticism from Abbott, who leveraged the issue into a major piece of legislation last year, Senate Bill 4, that prohibited so-called sanctuary cities. The law provides for sanctions, including prison, for elected officials who refuse, like Valdez once did, to cooperate with federal immigration authorities. Valdez has always argued that her position was more pragmatic than political, asserting that holding prisoners for federal authorities would only serve to fill jails.

Initially, Texas Democratic officials had a hard time finding a candidate to take on Abbott and his massive $40 million war chest. But Valdez stepped forward, along with a crowded field of Democrats who all had low statewide name recognition among voters. White, her chief primary rival, was always noted for being the son of former governor Mark White. When Valdez stepped into the arena, she immediately drew fire for her seeming lack of public policy knowledge. Several daily newspapers, and even LGBT and Hispanic political groups, ended up endorsing White and expressing concern about Valdez’s understanding of the complexities of state policy.

Abbott’s own actions—he declared Valdez the presumptive Democratic nominee weeks ago—suggest he has the candidate he wants in this election. The general election will be November 6.