MIAMI GARDENS, Fla. (AP) Tony Romo scrambled in the back of the end zone before improvising to throw his first pass in two months - left-handed for a short gain.
He did even better right-handed.
Romo pulled off his latest comeback victory Sunday, returning from a collarbone injury to throw for two scores, and the Dallas Cowboys won for the first time since he was hurt in Week 2, beating the Miami Dolphins 24-14.
The Cowboys (3-7) snapped a seven-game losing streak, their longest in a single season since 1989. They play host to undefeated Carolina on Thanksgiving.
''Winning,'' Romo said, ''is going to put a little more pep in everyone's step.''
Romo went 18 for 28 for 227 yards and overcame two interceptions by throwing touchdown passes of 31 yards to Terrance Williams and 16 yards to Dez Bryant.
''I got more comfortable as the game went on,'' Romo said.
''Him being back just gives everybody that much more juice,'' Bryant said. ''We all know who our leader is.''
Dallas' dominating defense added to his comfort level, beginning when linebacker Rolando McClain scored the game's first points and his first career touchdown on a 12-yard interception return. He stepped in front of a pass by Ryan Tannehill intended for Greg Jennings.
Another day of sputtering offense for the Dolphins (4-6) increased the likelihood they'll miss the playoffs for the seventh year in a row.
Romo looked rusty at times, and heavy rain and gusty wind early in the game didn't help.
''That's the way it's supposed to be,'' Romo said. ''That's why it's the NFL. You almost take it as a challenge, and it makes it almost more enjoyable.''
The Cowboys' first scoring threat ended when he was blitzed and his pass was intercepted by Brent Grimes. A frustrated Romo yelled at intended receiver Bryant as they headed for the bench.
''I love that kid,'' Romo said.
Romo soon settled down and showed his characteristic creativity. The left-handed desperation lob allowed him to avoid a safety on the Cowboys' opening possession.
''I didn't envision after my two-month layoff coming back with a left-hander,'' he said. ''I did practice that about seven or eight years ago, so I was ready for it.''
''It gave me a shiver,'' Cowboys owner Jerry Jones said, ''and I know it inspired the team.''
As expected, Romo sparked a team tied for next to last in the NFL in points. Since Week 2 of 2014, the Cowboys are 16-3 when he starts and 0-8 when he doesn't.
''He's a damned good player,'' coach Jason Garrett said. ''He has been for a long time.''
Darren McFadden provided offensive balance by rushing for 129 yards. Robert Turbin, who joined the Cowboys on Wednesday, added 35 yards on seven carries against a team ranked next-to-last in run defense.
''We've got to stop the run,'' Miami defensive tackle Ndamukong Suh said. ''We didn't do a good enough job in that area. That's pretty much as simple as it gets.''
The Dolphins had the ball for only 21 minutes and went 1 for 10 on third-down conversions. Their loss reduced the chances interim coach Dan Campbell will be back next year.
''I want to keep Dan around,'' Tannehill said. ''He does a great job. He's exciting. Everyone in our locker room believes in him. But as players we've got to go out and do a better job.''
The game matched a pair of last-place teams and looked it at times. Dallas committed 10 penalties and Miami nine.
A dance celebration by Bryant and Williams following a score prompted an unsportsmanlike conduct penalty that helped Miami score a touchdown in the final seconds of the first half.
But Bryant beat a linebacker and a safety for the touchdown that put the Cowboys ahead to stay, 21-14, on the first play of the fourth quarter.
''We looked like our old selves in a lot of ways,'' tight end Jason Witten said.
The Cowboys mounted an 8 1/2-minute drive for their first offensive score. A third-down holding penalty on cornerback Jamar Taylor allowed the Cowboys to keep the ball, and he was beaten deep by Williams on another third down for the TD.
''I put this loss on me,'' Taylor said.
Tannehill threw touchdown passes of 12 yards to Jordan Cameron and 29 yards to Kenny Stills. But Romo directed a late 5 1/2-minute drive that sealed Dallas' win.
NOTES: Neither team reported any injuries. ... Romo and Bryant connected on a TD pass for the 50th time, breaking the team record of 49 set by Troy Aikman and Michael Irvin. ... Garrett earned his 44th regular-season victory, tying Jimmy Johnson for second place in Cowboys history behind Tom Landry, who had 250 wins. ... Witten broke Bob Lilly's franchise record for consecutive games played with his 197th.
AP NFL website: www.pro32.ap.org and http://twitter.com/AP-NFL
Follow Steven Wine on Twitter: http://twitter.com/Steve-Wine. . His work can be found at http://bigstory.ap.org/content/steven-wine