East Carolina quarterback Shane Carden threw three touchdown passes and scored a rushing touchdown with 16 seconds left to lead the Pirates to a 28-21 upset of No. 17 Virginia Tech on Saturday.

Carden completed 23 of 47 passes for 427 yards in carrying the Pirates to their first victory over a ranked team since 2009 when they beat then-No. 18 Houston 38-32 in Greenville, North Carolina.

East Carolina (2-1) snapped a five-game losing streak to ranked opponents.

Virginia Tech (2-1), coming off a road win over then-No. 8 Ohio State, tied the game on an 18-yard touchdown pass from Michael Brewer to Cam Phillips with 1:20 left.

But the Pirates needed just three plays to go 65 yards and scored the winner on a 1-yard run by Carden

Brewer completed 30 of 56 passes for 298 yards, with three touchdowns and two interceptions for the Hokies.