ARLINGTON, Texas — Peyton Manning spent all afternoon putting the Broncos in the end zone during a wild shootout with Tony Romo and the Dallas Cowboys.
The last time he got the ball, Manning kept Denver out of the end zone — and that was the best way to win the game.
The four-time MVP kept up his record pace for touchdown passes, Matt Prater kicked a 28-yard field goal as time expired after an interception by Romo spoiled the first 500-yard game in Dallas history, and the Broncos stayed unbeaten with a 51-48 victory Sunday.
"It was pretty amazing that it came down to the defense making a big play at the end," Denver coach John Fox said. "Thank God our offense kept us in the game all day long."
In the waning seconds of one of the highest-scoring thrillers in NFL history, Manning ensured that his kicker — not Romo — had the last chance to score.
And with that, the Broncos ran their total to 230 points this season — the most by an NFL team through the first five games. The Broncos have also won 16 consecutive regular-season games.
The Broncos (5-0) had moved the ball to the Dallas 2 after Danny Trevathan's diving interception at the 24 in the final 2 minutes.
Needing a first down but not a touchdown so they could run out the clock, Manning and Knowshon Moreno shouted at each other in the backfield just before the snap.
"He basically was asking me, 'How am I supposed to do that? How can I get a half a yard but not get a yard and a half?'" said Manning, who threw for 414 yards and four touchdowns to give him a record-setting 20 in the first five games.
"I just said, 'You can't! You can't score! You can't do it!'"
Moreno managed to pull off the first down without scoring, and Manning took three snaps to drain the clock to 2 seconds for Prater, who also had a 50-yarder among his three field goals.
It was quite a debate over a measly yard in a game with 1,039 yards of total offense combined in the fourth-highest highest scoring game in NFL history and tied for the second-highest in regulation since the NFL-AFL merger in 1970, according to STATS.
Romo was 25 of 36 for 506 yards and five touchdowns, breaking Don Meredith's franchise record of 460 yards. He is the fifth quarterback in NFL history to pass for at least 500 yards and five touchdowns in a game.
Romo's 79-yard pass to Dez Bryant set up a 4-yard scoring toss to Cole Beasley for a 48-41 lead.
Manning, who threw for 414 yards and moved past Dan Marino for second on the career passing list with 61,371 yards, answered by leading a nine-play, 73-yard drive to Moreno's tying 1-yard score with 2:44 remaining.
Romo's interception came two plays later, when Trevathan dived in front of tight end Gavin Escobar.
"I was baiting him," said Trevathan, who scared his teammates with a knee injury in practice last week that turned out not to be serious.
"Romo threw it and I felt like, man, hopefully I don't drop the ball when I get in the end zone this time. I fell to the ground and said, 'Forget it!'"
The Cowboys (2-3) were on the verge of getting blown out early in the second half when they finally stopped Manning and forced a field goal. They later ended his streak of 227 passes without an interception when Morris Claiborne picked him off late in the third quarter.
Dallas, which scored its most points ever in a loss, converted the turnover into a 41-38 lead on Romo's 10-yard pass to Jason Witten, but the Broncos pulled even with a drive to Prater's 50-yarder.
The biggest momentum swing came on Romo's 82-yard touchdown to rookie Terrance Williams that cut Denver's lead to 35-27 in the third quarter.
"So you leave this game and obviously you are crushed and disappointed," said Witten, who had 121 yards receiving and a touchdown. "Offensively, this needs to be the standard by which we play."
The Cowboys jumped ahead 14-0 in the first quarter, but Dallas defenders just couldn't stay with Denver's receivers. Then Manning fooled them and the 92,758 watching his first game at the $1.2 billion home of the Cowboys with a bootleg for an easy 1-yard score and a 28-17 lead late in the first half.
Denver lined up for what looked like a run on third down from the 1. But Manning had faked the handoff, and the roar from thousands of orange-clad Denver fans grew as they realized he was jogging toward the left corner of the end zone for his first touchdown rushing since 2008.
"The key is you want to do it about every five years or so," Manning said. "If you do it every game, they're going to be playing it right. Naked bootlegs only work, the ones I've done, is when you don' tell anybody."
Romo got Dallas in position for a 48-yard field goal by Dan Bailey just before halftime with a 38-yard completion to Williams, who had 151 yards receiving.
Bryant had six catches for 141 yards and two touchdowns.
Julius Thomas led the Broncos with 122 yards and two scores, and Moreno had 93 yards rushing for the Broncos.
NOTES: Manning fell two passes short of Jake Plummer's franchise record of 229 straight passes without an interception. Plummer set the mark in 2005. ... Manning's 20 TDs through five games broke Daunte Culpepper's record for Minnesota of 18 in 2004. ... Broncos CB Chris Harris, who started in place of Champ Bailey, didn't play in the second half because of a concussion.
AP NFL website: www.pro32.ap.org
Follow Schuyler Dixon on Twitter at https://twitter.com/apschuyler