BALTIMORE - Ravens cornerback Cary Williams jumped in jubilation before excitedly sprinting toward Baltimore's sideline.
Dallas Cowboys kicker Dan Bailey had just missed on an attempt at a game-winning field goal, capping a wild final 36 seconds and allowing the Ravens to escape with a 31-29 victory Sunday afternoon.
"I was happy as hell," Williams said while smiling, later adding, "I'm happy. I'm ecstatic. This is a great win for the organization. As far as I'm concerned, I'm going to smile all night."
Bailey's miss was the culmination of a crazy finish Sunday.
Less than a minute earlier, the Ravens came up with what looked to be a game-deciding stop on a Dallas two-point conversion attempt. Yet, just moments later, the Cowboys had new life after recovering an onside kick. And after a pass interference penalty on Baltimore cornerback Chykie Brown advanced the ball to the Ravens' 34-yard line, the Cowboys appeared to be in range for a Bailey field goal.
But after a short-gain on their next play, Bailey missed left and the Ravens (5-1) salvaged the win.
"I'm just proud of this team," Baltimore coach John Harbaugh said. "It was a team victory. Was it perfect? Was it pretty? No. And I'm sure that's all stuff that will get written about, and it's all fine, but a victory is still a victory."
Baltimore was once again gashed on the ground - the second straight week that's happened - but Ravens quarterback Joe Flacco had success against a Dallas pass-defense that entered Sunday as the NFL's best.
The Cowboys (2-3) limited their first four opponents to an average of just 169.5 yards per game, but Flacco finished 17-of-26 for 234 yards with one touchdown and no interceptions.
Exploiting the same press-man coverage that gave Baltimore's passing game trouble just a week earlier, Flacco completed passes to eight different receivers.
Anquan Boldin led the Ravens with five catches for 98 yards. Torrey Smith had two catches for 24 yards, including a 19-yard touchdown to give Baltimore a 17-10 lead late in the second quarter.
"We just ran our offense," Smith said. "There's nothing special about press-man. I'm so glad we were able to move the ball so you all [the media] could stop asking us about press-man, but we were able to finish and make enough plays. We lucked out - got a little bit of luck - but the offense made enough plays and we've just got some work to do as a team."
With its running game as the catalyst, Dallas outgained the Ravens 481-316 and held a significant edge in time of possession (40:03 to 19:57).
After struggling to establish their rushing attack in recent weeks, the Cowboys racked up 227 yards on 42 carries while averaging more than five yards per carry.
The 227 rushing yards represent the most-ever allowed by Baltimore.
Dallas running back DeMarco Murray had 13 carries for 90 yards during the first half, but missed most of the second half with a sprained foot, giving way to backup Felix Jones. Jones finished with 92 yards on 18 carries. The Cowboys even had some success with third-stringer Phillip Tanner (nine carries for 31 yards) and fourth-stringer Lance Dunbar (one carry for 11 yards).
"They did a good job running the ball - finding holes, finding seams," Ravens defensive lineman Arthur Jones said, later adding, "We've got to do a better job wrapping up and tackling."
Dallas threw the ball nearly 70 percent of the time during its first four games, but employed a run-first approach Sunday.
The Ravens have yielded 441 rushing yards during their last two games. They surrendered 214 yards on 50 carries against the Kansas City Chiefs last week.
"I thought we did a good job with [our running game],"Cowboys coach Jason Garrett said. "We stayed after them. We ran it inside, we ran it outside. We got some good stuff out of the run games and I thought that was a positive for us."
Dallas quarterback Tony Romo was 25-of-36 for 261 yards with two touchdowns and one interception.
He struggled early - going just 9-of-12 for 81 yards with no touchdowns and the interception during the first half - but had some success late against a pass defense that was without top cornerback Lardarius Webb.
Webb suffered a potential season-ending knee injury during the second quarter.
Romo was 16-of-24 for 180 yards with two scores and no interceptions in the second half.
Wide receiver Dez Bryant had 13 catches for 95 yards and two scores.
His second touchdown, a 4-yard grab, trimmed Baltimore's advantage to 31-29 with 36 seconds remaining in the fourth quarter, but he followed by dropping what would've been a game-tying two-point conversion.
Dallas recovered an onside kick moments later, but Bailey missed on the game-winning field goal attempt with seconds left in the quarter.
"We have things that need to be fixed, and we're going to go ahead and do that, but most importantly we got the win," Jones said. "That's what it comes down to."
Reach staff writer Matt Zenitz at 410-857-7896 or firstname.lastname@example.org. Follow him on Twitter @mzenitz.