DETROIT (AP) -- Tony Romo and Jason Witten put mistakes behind them well enough to connect on a game-winning touchdown that gave the Dallas Cowboys the NFC East title.
Romo threw a 16-yard pass to Witten with 18 seconds left, lifting Dallas to a 28-27 win over deflated Detroit on Sunday.
The quarterback fumbled near midfield on the drive and the bouncing football was recovered by a teammate after going through a linebacker's hands. The tight end lost the football on the previous possession, less than 1 yard from a go-ahead score.
"I was excited to have the ball back after thinking I lost the game for us," said Witten, who set a franchise record with 15 receptions and a career-high with 138 yards receiving.
Dallas (12-1) clinched the NFC East for the first time since 1998 and moved a step closer to earning home-field advantage in the conference playoffs.
"It's important for us to win our division so that we can play at home," said coach Wade Phillips, sporting a white championship hat and T-shirt. "We're going to play at least one game at home. We're now going to try and get a bye and also get home field."
The Lions (6-7) are left wondering why their season fell apart after winning six of their first eight games, creating a positive buzz for the first time since Matt Millen took charge of the once-mediocre franchise in 2001.
After losing five straight, they officially can't live up to quarterback Jon Kitna's expectations of a 10-win season.
The latest loss delayed the inevitable, though. The Lions would've had trouble reaching the goal with a closing stretch that includes road games against San Diego and Green Bay, along with a home game versus Kansas City.
Detroit put up a fight as a double-digit underdog, but that wasn't enough to satisfy offensive tackle Damien Woody.
"That's part of the problem with the Lions. It's acceptable to put up a fight and all those type of things," Woody said. "At the end of the day, it's really not acceptable.
"It's all about wins."
The Cowboys would not have won without Romo's steady leadership and Witten's soft hands, and their ability to forget about miscues.
Romo was 35-of-44 for 302 yards and two TDs, helping the Cowboys win 12 of their first 13 games for the first time in franchise history.
"I'm not trying to prove anything to anybody else but myself and my teammates that we're good enough to win a Super Bowl," Romo said.
The Lions had chances to win a game only they thought they could. It was a situation similar to the final week last season, when they went to Dallas with only pride at stake and beat a Cowboys team jockeying for playoff position.
Kevin Jones ran for 92 yards and two scores, T.J. Duckett had a 32-yard TD run and Detroit led 27-14 after three quarters.
"This is the ninth time we came from behind this year and it kind of shows you the character and heart of this team," Phillips said.
After Marion Barber scored for the second time early in the fourth period, the Lions had an opportunity to go ahead by more than a TD. But Jason Hanson's 35-yard field goal attempt sailed just wide right.
"You don't say it's over, but that was the season," Hanson said.
The blown chance came back to haunt Detroit.
After Witten fumbled and the Lions punted, Dallas got the ball back at its 17 with 2:15 and no timeouts left.
"I felt bad for Jay," Romo said. "I told him when we went to the sidelines that he was going to get another chance."
He did, thanks in part to a break that went Dallas' way when former Lion Kyle Kosier recovered Romo's fumble.
"It was unfortunate, but it was a great job by him," Romo said.
Romo converted a fourth down on the next play with a pass to Barber, and connected on his next two passes for first downs.
On a second-and-6 from the 16, Romo threw a perfect pass to Witten as he found an opening in the middle of the field on a post pattern.
"Witten played about as well as I've ever seen," Romo said.