Updated

St. Louis, MO (SportsNetwork.com) - Tony Romo threw for two touchdowns and the Dallas Cowboys matched the largest comeback in franchise history to defeat the St. Louis Rams, 34-31, on Sunday.

Romo finished 18-of-23 for 217 yards and an interception and DeMarco Murray rushed for 100 yards and a touchdown on 24 carries for the Cowboys (2-1), who erased a 21-0 Rams lead.

"You just understand that these games are 60 minutes, and they're not over just because you get off to a bad start," said Romo. "It was great to see the guys play well."

Dez Bryant caught six passes for 89 yards and a touchdown, Terrance Williams added a receiving score and Dan Bailey made two field goals in the win.

It was the largest comeback in regulation for the Cowboys, who overcame 21- point deficits in overtime in 1984 against New Orleans and 1999 against Washington.

Austin Davis threw for a career-high 327 yards on 30-of-42 efficiency with three touchdowns and two interceptions. Brian Quick, Austin Pettis and Lance Kendricks each caught a touchdown for St. Louis (1-2), which had Zac Stacy run the ball 12 times for 67 yards.

"This is an explosive offense with balance, and based off of our matchups and our history, we needed points," Rams head coach Jeff Fisher said. "Thirty-one points should be good enough to win, but we need to do a better job defensively"

Trailing 21-0 with six minutes to play in the second half, the Cowboys scored on their next five possessions to take a 27-24 lead.

Murray finally got going with back-to-back gains of 14 and 20 yards to place the Cowboys at the Rams' 31. A costly pass interference penalty in the end zone on third down set up Murray's plunge from a yard out for a 21-7 game.

Rams center Scott Wells fumbled a snap and the Cowboys took over at their own 47. A roughing the passer call paved the way for a 29-yard Bailey field goal and a 21-10 game heading into halftime.

The Cowboys received the ball to start the second half and quickly trimmed their deficit to four points. Gavin Escobar caught a 7-yard pass for a first down before Romo's deep play-action pass found Bryant wide open over the middle for a 68-yard score.

Quick's 11-yard catch and Kenny Britt's 16-yard grab helped place the Rams at their opponents' 24. After Britt was stopped just shy of a first down, St. Louis went for it on 4th-and-inches, but Stacy was stuffed and Dallas took over.

Romo hit Jason Witten for a pickup of 13 yards before Murray raced down the left sideline for 44. Bailey capped the 7-play, 62-yard march with a 40- yard field goal to get the Cowboys within, 21-20, late in the third.

Davis hit Britt for a deep 38-yard pass and Stacy rushed the ball 16 yards to Dallas' 28. The Rams settled for a 28-yard field goal from Greg Zuerlein early in the fourth after Cook dropped a pass in the end zone on third down.

Dallas moved the chains twice on third down early in its next drive. Romo scrambled up the middle for a 16-yard gain and Williams grabbed a 20-yard pass before a 33-yard pass interference penalty placed the Cowboys at the Rams' 20. Three plays later, Romo connected with Williams on a 12-yard touchdown pass to give the Cowboys a 27-24 edge with 6:13 to play.

On the very next play from scrimmage, Bruce Carter picked off Davis over the middle and took it back 25 yards for a 10-point Dallas lead.

Davis regained his composure and led the Rams down the field on an 11-play, 80-yard drive, capping the sequence when rolled out to his left and found Austin Pettis in the end zone for a 4-yard score.

The Cowboys were forced to punt. giving the ball back to the Rams with 1:58 remaining, but Morris Claiborne intercepted Davis to seal the Cowboys' win

St. Louis scored early on a lengthy 15-play, 80-yard trek that shaved 8:50 off the clock. Davis found Kendricks, who was tightly covered on the left side of the end zone for a 1-yard score.

Dallas worked the ball into St. Louis territory on the ensuing drive. On 3rd- and-4, Romo dropped a short pass off to Murray, who gained nine yards before Alec Ogletree knocked the ball loose and Cody Davis recovered it.

The Rams didn't need as long to find the end zone. Stacy hauled in a 17-yard pass to place the Rams at the Cowboys' 48 before Davis aired out a 51-yard bomb to Quick down the left sideline for a 14-0 lead early in the second.

On 3rd-and-8 of Dallas' next drive, Janoris Jenkins jumped in front of wide receiver Bryant and picked off Romo's pass, taking it back for a 25-yard score with 6:06 to play in the first half.

Game Notes

Bailey set the Cowboys' franchise record with 28 straight successful field goals, surpassing Chris Boniol, who set the mark with 27 in 1996 ... Dallas has won three straight games against the Rams ... Cowboys cornerback Orlando Scandrick made his 2014 debut after his four-game suspension was reduced to two under the NFL's new performance-enhancing drug policy ... The Rams outgained the Cowboys, 448-340.