In one of the most-watched congressional primaries in the nation, longtime U.S.. Rep Henry Cuellar narrowly defeated rising progressive Jessica Cisneros in the race for the Democratic nomination for Texas 28.

With all precincts in the nine counties that make up the district counted, Cuellar held on to his seat, 52 percent to 48 percent. The largest part of the district is based in Laredo, Cuellar’s hometown as well as Cisneros’, but Cuellar is the one who took it, 15,853 votes to 12,900.

Cuellar lost the small part of Bexar included in the congressional district by nearly half; Cisneros scored 8,682 votes to Cuellar’s 4,315.

The party’s establishment stood behind Cuellar, one of the most conservative Democrats in Congress — with some even making a stop at his campaign headquarters in Laredo — while progressives in D.C., including U.S. Rep. Alexandria Ocasio-Cortez, backed his challenger.

Cisneros’ supporters had hoped larger turnouts on Tuesday would propel her past Cuellar in the end.

The race provided an early test of the appeal of some of the party’s most far-reaching policy proposals — including the Green New Deal, which calls for a swift shift away from fossil fuels — in a district where the oil and gas industry employs tens of thousands. Cuellar, one of the few pro-gun, anti-abortion Democrats left in Congress, has taken to calling Cisneros a “socialist,” keying on the buzzword that has defined much of the Democratic presidential primary.

Cuellar brought in all the help he could get to retain the seat, including the conservative Koch brothers, whose political action committee spent tens of thousands on mailers supporting him. Oil and pharmaceutical companies, too, poured thousands into the pro-business congressman’s campaign during the final days of the primary. Local businessmen and the U.S. Chamber of Commerce contributed as well, in what ended up as one of the most expensive races in the state, with the total raised and spent in the South Texas district well beyond the $5 million mark.

Still, Cisneros, the 26-year-old daughter of Mexican immigrants who would have been the youngest member of Congress has she been elected, out-raised Cuellar during the final stretch of the race. She was backed by major progressive groups, including EMILY’s List, which supports women candidates, and Justice Democrats, the group that helped Ocasio-Cortez in 2018 defeat a longtime New York congressman who was a moderate Democrat.

Others including the Working Families Party dispersed teams of canvassers across Laredo, Cuellar’s home turf, and launched cable and digital advertisements.

“We knew this would be an uphill battle going in,” the group said in a statement earlier in the week. “But nobody ever said electing progressive champions would be easy.”

Cisneros branded Cuellar “Trump’s favorite Democrat” because of his penchant for crossing the aisle and voting with Republicans. She argued he was out of touch with the solidly blue district as she racked up endorsements from the state AFL-CIO, as well as Bernie Sanders, Elizabeth Warren and Julián Castro, the former San Antonio mayor and presidential hopeful now campaigning for Warren.

Among other issues, Cisneros has called for Medicare For All, getting money out of politics, and creating an independent immigration court system.

Cuellar, meanwhile, is well-known in the 28th Congressional District. A lawyer who has held the seat since 2005, he is one of three members of his family on the ballot this year in Laredo. His brother, Martin, is sheriff and his sister, Rosie, is tax assessor. Both are seeking re-election. His campaign also boasted endorsements from more than 200 former and current local Democratic officeholders.

The large 28th congressional district stretches from San Antonio to the southern border with Mexico. It has been reliably Democratic, but is unique in that it is largely rural and overwhelmingly Latino.

In the end, Cuellar won in five of the counties, including Atascosa, Starr, Webb, Wilson and Zapata. He lost in Bexar, Hidalgo and Wilson. The two candidates tied in tiny McMullen, where they each received nine votes.

Overall, Cuellar bested Cisneros by nearly 3,000 votes: 38,720 to 35,964, winning all of the counties except Bexar.