WEST POINT, N.Y. -- Kevin Hogan threw for three touchdowns, Tyler Gaffney had two touchdowns and 132 yards rushing, and No. 5 Stanford beat Army 34-20 on Saturday.
The Cardinal (2-0) entered the game as 30-point favorites but had their hands full from the opening kickoff, falling behind 6-0 at the outset as the much smaller Black Knights (1-2) challenged at every turn.
Hogan's 23-yard touchdown pass to Gaffney after an Army turnover gave Stanford a 27-13 lead late in the third quarter and the Cardinal averted an embarrassing moment. Army has not defeated a ranked team since a 17-14 win over No. 15 Air Force on Nov. 4, 1972.
Ty Montgomery had six catches for 130 yards and one score, while Hogan was 11 of 18 for 188 yards passing for Stanford.
Terry Baggett led Army with 96 yards rushing on nine carries.
Done in by three turnovers and eight penalties in a 40-14 loss last week at Ball State, Army needed to play a flawless game against the Cardinal to have a fighting chance and acquitted itself well. The Black Knights forced the lone turnover of the first half and neither team was penalized before the break.
The Black Knights' luck ran out in the third quarter. Trailing 20-13 and poised to tie the game, quarterback Angel Santiago botched a third-down handoff after the Black Knights had driven into Stanford territory and James Vaughters recovered the fumble for the Cardinal. Montgomery's 27-yard catch on a third-and-7 play near midfield set up Gaffney's touchdown catch.
Army failed on a fourth-and-1 play early in the fourth quarter inside its own 30 and the Cardinal secured the victory on Gaffney's 1-yard run.
Stanford's rushing defense has posted the best numbers in school history the past two seasons, allowing 84.4 yards per game in 2011 and 97 per game last year. Army's triple option led the nation in rushing both years, averaging a school-record 369.8 yards per game and accumulating 4,438 yards on the ground in 2012.
The Black Knights, despite the loss of four-year starter Trent Steelman at quarterback, entered Saturday's game on pace for another strong year, averaging 329 yards rushing in splitting their first two games. Not quite so effective without Maples and Dixon, they still finished with 284 yards rushing on 61 carries, and inspired play by the Army defense kept the game close for most of the first three quarters.
Masterful a week ago on third down, converting 12 of 15 in a convincing 34-13 win over San Jose State, the second-best mark in the nation, the Cardinal's bubble burst early against Army. Facing its first third down of the game, Stanford called timeout after just 50 seconds of play after Army's Robert Kough knocked down Hogan's first pass attempt.
It didn't help. When play resumed, Hogan was sacked by defensive end Mike Ugenyi and fumbled, and Army's Richard Glover recovered at the Stanford 30. The initial call was a sack, but it was reversed after a video review and Army gained a 3-0 lead on Daniel Grochowski's 39-yard field goal.
Grochowski added a career-long 48-yard field goal late in the first after the Army defense forced Stanford to punt for the first time this season.
Still, the Stanford defense had begun to assert itself, stuffing the run on three straight plays before the field goal, and the Cardinal broke through on their next possession.
Gaffney gained 41 yards rushing on three carries to set up Hogan's 26-yard TD pass to Michael Rector in the final minute of the first quarter. Rector caught the ball in the end zone after it was softly deflected near the goal line by Army's Josh Jenkins.
The Black Knights were pinned at their own 13 after the ensuing kickoff and went nowhere again. Stanford linebacker Trent Murphy sensed a pitchout on a third-and-7 play and nearly intercepted the ball in forcing a four-yard loss and Army's first punt.
Stanford scored on the next play from scrimmage as Hogan hit Montgomery in stride at the Army 5-yard line for a 46-yard touchdown. Montgomery turned Jenkins around with a nice fake and was all alone when he caught the ball.
Jordan Williamson added a 31-yard field goal with 3:53 to go before halftime, but the Black Knights refused to wilt. Terry Baggett ripped off a 46-yard run down the right sideline, with Jordan Richards' shoestring tackle preventing a touchdown. Two plays later, Dixon bolted 15 yards up the middle for a touchdown to narrow the Stanford lead to 17-13 with 69 seconds left in the second.