CeeDee Lamb caught a 12-yard touchdown pass with 40 seconds left Sunday, giving the Dallas Cowboys a 34-30 win over the Houston Texans.

Dallas trailed by four after Woody Marks scored on a 6-yard run with about 2½ minutes remaining. Dak Prescott answered with an 11-play, 74-yard drive that included a fourth-down conversion before his throw to Lamb. Houston had one more possession, but C.J. Stroud’s final pass fell incomplete.

Lamb finished with a career-high 17 catches for 189 yards. Javonte Williams scored three rushing touchdowns, all after halftime, including a 2-yard run that gave Dallas its first lead with about 11 minutes left. Prescott passed for 335 yards as the Cowboys moved to 2-2.

Stroud threw for 347 yards for the Texans, who fell to 0-4. Nico Collins, back after missing two games with a hamstring injury, caught seven passes for 118 yards and two touchdowns.