STANFORD, Calif. -- The defense might be as good any Stanford has had during its recent run of success.
The offense has dazzled, at times, but also struggled for prolonged stretches.
Heading into the bye week, the Cardinal know how dangerous they could be if both sides played at an equally high level.
"I think the defense is exactly where we want it to be," Stanford coach David Shaw said. "Offensively, we're close. We hate being close."
Devon Cajuste caught a career-high three touchdowns and finished with 52 yards receiving, and Ty Montgomery had two TDs to help the Cardinal (2-1) overcome a sluggish start on offense. Stanford led 14-0 at the half before overwhelming the Black Knights (1-1) in the final two quarters.
The Cardinal outgained Army 415 to 207 yards.
It was the second shutout for Stanford's defense in three games. The Cardinal beat UC Davis 45-0 to open the season before losing 13-10 to USC last week.
"I feel we're in a great spot right now," linebacker Blake Martinez said. "Obviously, there's going to be mistakes that we made today that we're trying to get corrected. We're jelling pretty well."
Army ran for 341 yards and seven touchdowns in a 47-39 victory against Buffalo in its opener under new coach Jeff Monken, but couldn't crack the Cardinal's physical defense.
Army held the ball for more than 33 minutes behind its triple-option offense, which was stuffed on fourth-and-1 from the Cardinal 2-yard line in the final minutes to preserve Stanford's shutout.
"The last play of the game was a perfect example. It was a good play, but we can't block them," Monken said. "They knocked us back. That happened too often."
Montgomery helped lead the way for Stanford, catching eight passes for 86 yards and a touchdown. He also ran for a short score as a wildcat quarterback.
Barry Sanders -- the son of the Hall of Famer with the same name -- added a career-high 92 yards rushing on nine carries, including a 44-yard scamper to set up Cajuste's third touchdown catch. The Cardinal finished with 199 yards on the ground.
Army's unusual offensive formation -- by today's standards, anyway -- gave the Cardinal more trouble than expected at West Point last season. The Black Knights led 6-0 early and kept the game close most of the way before Stanford pulled ahead for a 34-20 victory.
But Stanford had few problems defending Army's triple-option this time. Instead, it was the offense that looked out of rhythm at the start.
Stanford punted on four of its first six possessions. Montgomery fumbled a punt return that the Black Knights recovered in the second quarter, and Stanford had a touchdown wiped away for the second straight week when David Bright was called for holding on Kelsey Young's TD run.
Three plays later, Cajuste caught his second touchdown pass from Hogan -- a short fade in the corner of the end zone -- to give the Cardinal a 14-0 lead.
Stanford put together a nine-play, 98-yard TD drive on its first drive of the second half that ended with another catch by Cajuste. Stanford stopped Army's fake punt on the next possession to set up Montgomery's 4-yard touchdown run, and the Cardinal's do-it-all playmaker caught a 32-yard TD pass in the fourth quarter.
The Cardinal improved to 8-0 after losses under Shaw and haven't dropped consecutive games since 2009. Stanford's next game is at Washington on Sept. 27.
"We're not where we want to be," Hogan said. "It was a good day today executing, but we know we can get better. We stalled there in the first half. We have to find a way to continue those drives and put more points on the board."
The best college QBs of the 2000s
Relive the college careers of Tim Tebow, Cam Newton, Baker Mayfield and Joe Burrow.
FCS college football weekend preview
Top contenders from the Big Sky Conference -- including Eastern Washington QB Eric Barriere -- take the field, North Dakota State battles Southern Illinois on ESPN+ and much more in a full weekend of FCS football.
Ranking college football's top 60 quarterbacks of the 2000s
Quarterback play has evolved more than ever in the past 20 years. Here are Bill Connelly's top 60 players at the position since 2000.
Deion Sanders' second game at Jackson State postponed due to positive COVID-19 test on Mississippi Valley State
Jackson State head coach Deion Sanders' second game with the team has been postponed due to a positive COVID-19 test on Mississippi Valley State and subsequent quarantining of student-athletes within the program.
What QB does Kiper have the Pats trading up to get?
Mel Kiper Jr. projects the Patriots will trade up to take North Dakota State QB Trey Lance, and Louis Riddick gives high praise for Lance, saying he could be the wildcard of this draft.
Harbaugh says there was no disconnect among Michigan staff, players in 2020
Jim Harbaugh tells reporters that he does not feel there was a disconnect between his staff and players last season.