Carden's TD run with 16 seconds left gives East Carolina 28-21 win over No. 17 Virginia Tech

East Carolina's Bryce Williams catches a pass in the end zone for a touchdown during an NCAA college football game against Virginia Tech, Saturday, Sept. 13, 2014, in Blacksburg, Va. (AP Photo/Don Petersen) (The Associated Press)

East Carolina's Bryce Williams (88) catches a deflected pass during an NCAA college football game against Virginia Tech, Saturday, Sept. 13, 2014, in Blacksburg, Va. (AP Photo/Don Petersen) (The Associated Press)

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.