Both parties and interest groups on both sides had spent heavily to boost their candidate in the district, which spreads from the El Paso area in the west to San Antonio.

Gallego, who had to make it out of a competitive primary to face Canseco, had the backing of environmental groups in the race. 

The incumbent had tried to use that support against Gallego, casting himself as a champion of the oil-and-gas industry.

But Gallego focused criticism on Canseco’s previous opposition of the DREAM Act in his bid to represent the majority-Hispanic district.