Updated

In a week when Tony Romo vowed to play his best, the Dallas Cowboys quarterback rallied the team in a thrilling comeback while playing through the pain of a fractured rib.

Romo, who is Mexican-American, tapped his coach on the shoulder and made his case.

He would play hurt at some point, so why not go for it?

The quarterback convinced Jason Garrett. He probably convinced thousands of others, too.

Collapse in Week 1, thrilling comeback seven days later. Same score, similar ending.

More On This...

Romo hit Jesse Holley on a 77-yard completion on the Cowboys' first play of overtime that set up Dan Bailey's winning 19-yard field goal, and Dallas pulled off an improbable 27-24 victory over the San Francisco 49ers on Sunday.

"Eventually, what was convincing was, 'At some point I'm going to play with this thing, so why not now?'" Garrett said, quoting Romo. "It's about a quarterback but it's really about a football player and a competitor. And Tony is that. One of the best competitors I've ever been around."

In a week when Romo vowed to play his best game, he delivered a gutsy performance that looked so unlikely when he briefly came out from halftime and then returned to the locker room.

This was a reverse of what happened a week earlier: a 27-24 road loss to the Jets after Dallas blew a late 14-point lead and watched New York kick the winning field goal. Romo's late interception contributed to that collapse. Going on a few hours of sleep, he was back to work early Monday morning preparing for the 49ers.

"I didn't want to be 0-2," Romo said. "Getting into an 0-2 hole is devastating in the National Football League."

Moments after the Cowboys (1-1) announced the quarterback was done for the day, there came No. 9 ready to take charge of the huddle again.

Romo felt sick to his stomach. It hurt to breathe, let alone bark out the cadence in a hostile road stadium.

In one frantic span, Romo emphatically left his mark on the storied Cowboys-49ers rivalry that dates back decades to all those epic matchups in the NFC title game that regularly set up Super Bowl victories by the winner.

"It's got to be one of those things that will follow him through his career. I know what it was here in the locker room at halftime. I know what he had to do to get back on the field," Cowboys owner Jerry Jones said.

"I know what he had to do before (painkillers) took hold to relieve him from his pain. But, boy, did he come back. That was inspirational."

Romo emerged from the locker room after the second-half kickoff and walked briefly into the huddle as Jon Kitna returned to the sideline, then Romo immediately came off under doctor's orders and headed back to the locker room.

"It was a tough halftime," Romo said. "I wanted to go back out, I tried to. The docs pulled me aside and didn't let me."

Bailey kicked a tying 48-yard field goal Sunday as time expired in regulation after missing an early 21-yard attempt. That delighted the large contingent — close to one-third — of Cowboys fans in Candlestick Park.

Romo completed five of six passes on the tying drive, connecting on consecutive throws to Holley before finding him again in OT.

Romo wasn't the only one playing hurt, either. Running back Felix Jones separated his shoulder early in the game, Jerry Jones said.

Miles Austin made three touchdown receptions among his nine catches for 143 yards, leaping over a defender and diving into the end zone to pull Dallas within 24-21 with 6:55 to play. Austin later hurt his hamstring.

Jones won't need to defend Romo after this one. He grimaced and limped. He needed help from a lineman to stand up as the vicious hits kept coming.

Romo completed 20 of 33 passes for 345 yards and Kitna found Austin for a 5-yard TD, but also threw two interceptions during his brief appearance. As Romo's teammates celebrated, cheered and hugged, he slowly made his way to midfield for postgame handshakes.

Romo returned for the last series of the third quarter, the final 15 minutes and OT. He didn't give Garrett much chance to say no.

"I just told him I was good to go. I think he asked some of the guys," Romo said. "I didn't give him too much of a chance. I just ran on the field."

The 49ers (1-1) were trying to move to 2-0 under new coach Jim Harbaugh after a 33-17 victory over defending NFC West champion Seattle last week.

Alex Smith threw for 179 yards and two touchdowns, including a 29-yard strike to Delanie Walker in the third quarter. Smith found himself in the familiar predicament of getting hit. He was sacked six times as San Francisco's offensive line often failed to protect him or give him ample time in the pocket to be effective.

Frank Gore ran for a 1-yard score and Kyle Williams had a 12-yard touchdown catch as San Francisco went ahead 14-0.

After Jones this week called Romo's performance against the Jets "outstanding," Romo made all the right calls in crunch time.

He played through multiple hits in the first half, when he threw a late 53-yard touchdown pass to Austin to bring Dallas within 14-7. The QB came up slowly after being clobbered on a blindside cornerback blitz by Carlos Rogers as he was throwing in the second quarter.

Romo looked to be headed for another tough day.

The Cowboys came up short on a 76-yard drive over the opening 7½ minutes after Bailey missed wide right on his 21-yard field goal attempt. Then, it was three straight three-and-outs.

When it mattered, Romo came through.

"He understands that all eyes are on him," said San Francisco safety Donte Whitner, beat on the deep throw in OT.

"They expect him to lead them to the playoffs and ultimately a championship. For a guy like that, after the things that happened last week, you expected him to come back into the football game."

Based on reporting by the Associated Press.

Follow us on twitter.com/foxnewslatino
Like us at facebook.com/foxnewslatino