After the Buccaneers had closed to within a touchdown, the Ravens ran out the final 3:05 of the game despite having left tackle Michael Oher and fullback Le'Ron McClain out with injuries.

It wasn't a convincing win. It wasn't a complete game. But it was "a win that we needed to get us to December to compete for the things we want to compete for," Ravens coach John Harbaugh said. "Now, we're playing the biggest game of the year."

The Ravens' sixth win decided in the fourth quarter this season served as a dramatic lead-in to Sunday night's showdown with the Pittsburgh Steelers (8-3) for first place in the AFC North. The Steelers pulled out a 19-16 overtime win over the Bills on a 41-yard field goal by Shaun Suisham.

If the Ravens (8-3) can sweep their division rival for the second time in their history, they'll hold the tiebreaker edge and take a one-game lead over Pittsburgh with four games remaining.

"It'll be a statement game for us," tight end Todd Heap said. "We know what's in front of us."

In a season in which the scares have equaled the wins, the Ravens (8-3) battled attrition for their eighth straight home victory, the NFL's longest current streak (including playoffs).

Unable to put another team away before the fourth quarter, the Ravens watched Tampa Bay pull to within 17-10 on a leaping 5-yard touchdown grab by tight end Kellen Winslow with 3:05 remaining in the game.

The Ravens' offense took possession knowing the team's defense has given up three game-tying or -winning drives in the final two minutes of regulation this season. This time, running back Ray Rice wasn't going to give the ball back.

Rice gained 40 yards on that final drive (29 rushing and 11 receiving) and produced the three first downs needed to finish off the Buccaneers (7-4), who still haven't beaten a winning team.

Pounding the ball against the NFL's 29th-ranked run defense was a feat, considering the Ravens didn't have Oher (sprained knee, third quarter) and McClain (sprained ankle, second quarter).

The Ravens sealed the game in the fourth quarter, but they essentially won it in the second, when they jumped on the Buccaneers for 17 points, which matches their most points scored in a quarter this season.

With the score 3-3 in the second quarter, Flacco threw touchdown passes to two wide-open targets, Heap and wide receiver Derrick Mason.

An uncovered Heap caught the pass 20yards downfield and outran the Buccaneers for 45 yards to the end zone. The 65-yard touchdown catch was the longest of Heap's 10-year career and the longest play from scrimmage for the Ravens this season.

"You don't want to get caught in that situation," Heap said. "I felt one guy coming from behind me, but I didn't feel like he was gaining too quickly."

Flacco, who was 25 of 35 for 289 yards, celebrated the touchdown but not the fact that he surpassed Vinny Testaverde as the Ravens' all-time leader in touchdown passes.

"Vinny didn't play here that long, so it's not that much of an accomplishment," said Flacco, who now has 53 career touchdown passes. "Hopefully I can make that a little higher for somebody else to break in the future sometime."

On the Ravens' next drive, Flacco added to that total by orchestrating the two-minute drive, which started and ended with Mason. He connected with Mason for completions of 6 and 7 yards. A 24-yard pass-interference penalty on Tampa Bay set up the Ravens in the red zone.

Flacco's seventh completion of the half to Mason went for a 10-yard touchdown to stake the Ravens to a 17-3 lead with 37 seconds left in the half. Lining up in the slot, Mason stutter-stepped to fake safety Sean Jones and get open in the end zone.

Flacco threw to Mason on 13 of his 35 pass attempts, completing eight passes for 87 yards (both team highs). This came a week after they had a heated exchange on the sidelines at Carolina.

"Joe and I have been together a long time," Mason said. "If him and I have a dispute, it's just a dispute. He's not going to lose faith in me, and I'm not going to lose faith in him. It's like pitch and catch between us. As long as I'm here and as long as Joe's here, I don't think anything is going to change."

The third quarter was a frustrating one for the Ravens because of the officials. Ray Rice's 76-yard touchdown run -- which would have put the Ravens up by 21 points -- was negated by a questionable illegal block in the back by wide receiver Anquan Boldin. Replays showed Boldin barely getting a hand on safety Sabby Piscitelli.

"It wasn't a hold at all," Boldin said. "It was a bogus call."

Later in the quarter, Cory Redding's first career interception -- which would have put the Ravens at the Tampa Bay 11 -- was overruled by a replay challenge because he didn't have possession of the ball when he went to the ground. Redding said the turnover was broken up by a teammate.

"That's right, Ray [Lewis], you stripped the ball," Redding said with a laugh. "I had the interception, but it was all good. We won the game, and that's all that matters."

Other than that late touchdown, the Ravens' defense rattled the young Buccaneers. Their pass rush hurried quarterback Josh Freeman (17-for-37 for 162 yards) all game. Their front seven quieted bruising running back LeGarrette Blount (55 yards).

Now, the Ravens' focus turns to the Steelers and a prime-time game that transcends the regular season.

"We're 8-3 going into a championship game, and you can't ask for nothing better than that," linebacker Terrell Suggs said. "The Bucs came in, and they're a good team. But they ran into a team of destiny."