COLLEGE PARK, Md. (AP) Clint Trickett passed for 511 yards and four touchdowns, and West Virginia gave away a 22-point lead before Josh Lambert kicked a 47-yard field goal as time expired to give the Mountaineers a 40-37 victory over Maryland on Saturday.
West Virginia (2-1) let a 28-6 lead dwindle to 28-27 in the third quarter, then gave away a 10-point advantage in the fourth quarter before Trickett directed a 65-yard drive to set up Lambert's game-winning kick.
Trickett went 37-for-49, and his passing yardage was the second-most in West Virginia history behind a 656-yard performance by Geno Smith in 2012. The Mountaineers finished with a whopping 694 yards in offense compared to 447 for Maryland (2-1).
West Virginia's Kevin White had 13 catches for 216 yards and Mario Alford caught 11 passes for 131 yards and two scores.
A year ago, Maryland beat West Virginia 37-0 while Trickett watched from the sideline. In this one, the Florida State transfer riddled the Terrapins defense with precise short passes and a sprinkling of deep throws that kept Maryland guessing.
Maryland's C.J. Brown ran for a touchdown and threw for a score. He gained 161 yards on the ground and went 19 for 35 for 241 yards through the air.
Brown left the game late in the first half after absorbing a jarring hit that popped the helmet from his head. But the sixth-year senior returned in the second half and sprinted for a 75-yard score on the first play from scrimmage to get Maryland to 28-27.
The comeback started with a 77-yard pass from Brown to Stefon Diggs, and Caleb Rowe connected with Jacquille Veii for a 26-yard score to bring the Terps to 28-20 at the half.
After Brown's long run, West Virginia got some breathing room when a blocked punt rolled out of the end zone, and Trickett made it 37-27 with an 11-yard touchdown pass to Daikiel Shorts.
But a fumble on a punt return set up a Maryland field goal, and William Likely tied it at 37 with a 69-yard punt return with 9:43 remaining.
The game might not have been close except for West Virginia mistakes. The Mountaineers committed four turnovers - three inside the Maryland 30 - and had a field-goal try blocked.
The Mountaineers rolled up 382 yards in offensive in the first half, including 307 in the air.
West Virginia made a statement on the game's first play, a 50-yard completion from Trickett to Wendell Smallwood. That set up a 1-yard touchdown run by Rushel Shell, the Mountaineers' first score against Maryland in two games.
There would be more touchdowns. Many more.
After Trickett threw a 43-yard TD pass to Alford, Maryland countered with a field goal. Less than a minute later, White broke from the right side, caught a short pass and sprinted across the field for a 44-yard score.
Following another Maryland field goal, Alford made a leaping catch in the left corner of the end zone for a 36-yard TD and a 28-6 lead.