ARLINGTON, Texas (AP) -- Tony Romo turned Adrian Peterson's homecoming from sweet to sour in the final minute.
Romo threw for 337 yards and two touchdowns, including the go-ahead score to Dwayne Harris with 35 seconds left, and the Dallas Cowboys beat the Minnesota Vikings 27-23 Sunday.
Romo's 7-yard pass to Harris answered an 11-yard touchdown by Peterson that had given Minnesota a 23-20 lead. The East Texas kid raised on the Cowboys had 140 yards rushing in his first game at their $1.2 billion stadium.
The Cowboys (5-4) bounced back from a devastating loss at Detroit by avoiding what probably would have been a more damaging defeat.
Christian Ponder threw for a touchdown and ran for another score against his hometown team, but it wasn't enough to avoid a fourth straight loss for the Vikings (1-7).
Jason Witten had eight catches for 102 yards and a TD for Dallas.
Romo's first attempt to answer Peterson's go-ahead score was an interception on a great play along the sideline by A.J. Jefferson. But the Vikings couldn't convert that into points and gave Romo the ball back at the Dallas 10.
Dez Bryant had a 34-yard catch that put Dallas in position for at least a tying field goal, but Romo, who was 34 of 51, kept pushing.
Romo threw 9 yards to Cole Beasley and 5 to Witten before an incompletion. On the next play, he found Harris cutting between defenders in the middle of the field, and Harris dived over the goal line.
Peterson got Minnesota's go-ahead drive earlier in the quarter going with a 52-yard run, then went the final 11 on fourth-and-1. He easily got the first down and carried safety Jeff Heath the last few yards, with Heath trying to strip the ball as Peterson crossed the goal line.
After one touchdown between the teams in the first half, there were three in the first 7 minutes of the third quarter.
Romo had consecutive 26-yard completions to Witten, the second for a touchdown and a 13-10 lead.
After Cordarrelle Patterson fumbled a short kickoff out of bounds at the Minnesota 5, George Selvie knocked the ball out of Ponder's hand in the end zone. Nick Hayden recovered to give the Cowboys touchdowns just 10 seconds apart.
Ponder, who was 25 of 37 for 236 yards with a touchdown and interception, found Jennings for 27 yards on third-and-4, allowing Minnesota to answer quickly when Kyle Rudolph bounced off Cowboys safety Barry Church on the Dallas 6 and finished off a 31-yard scoring catch to get the Vikings to 20-17.
The Cowboys were in position to extend that lead when Bryant took his team out of field goal range with unsportsmanlike conduct for taking off his helmet and arguing with officials as a pass interference penalty against him was about to be announced.
Bryant, who made headlines last week with a pair of sideline outbursts in a loss at Detroit, later dropped an easy first-down catch on second-and-18 on a drive that ended with a punt.
Ponder led a pair of 11-play scoring drives in the first half, the second one ending on his 6-yard scramble for a 10-6 lead late in the second quarter.