San Francisco 49ers running back Frank Gore (21) is tackled by Baltimore Ravens defenders in the first half of an NFL football game in Baltimore on Thursday

San Francisco 49ers running back Frank Gore (21) is tackled by Baltimore Ravens defenders in the first half of an NFL football game in Baltimore on Thursday

Ravens beat 49ers in historic duel

Baltimore 16 San Francisco 6 BALTIMORE — John Harbaugh could have gloated. He could have bragged.

Baltimore 16 San Francisco 6

BALTIMORE — John Harbaugh could have gloated. He could have bragged.

Instead, the Baltimore Ravens coach played the role of gracious big brother after he bested Jim Harbaugh and the San Francisco 49ers 16-6 Thursday night in the first NFL game featuring brothers as opposing head coaches.

The Ravens (8-3) tied a franchise record with nine sacks to end San Francisco’s eight-game winning streak.

“To the 49ers and to my brother, I can’t tell you enough how proud I am of him and the job he’s done building that football team,” John said of Jim, a rookie NFL coach. “That’s a football team. The way they’re built, it’s pretty hard to figure out a way to beat them.”

John, 49, and Jim, 47, grew up dueling each other in all sorts of games. This, however, was the first time their sibling rivalry was displayed on a national stage.

During the final minute, John got a Gatorade bath from his players — twice. After the game ended, the brothers hugged at midfield.

“There’s a saying that says, ’As iron sharpens iron, so does one man sharpen another,”’ Jim said. “And I have to say my brother John is the sharpest iron I’ve ever encountered in my life.”

The Ravens chased, hindered and battered 49ers quarterback Alex Smith for much of the night despite playing without middle linebacker Ray Lewis, the team’s leading tackler and spiritual leader. Lewis was inactive for a second straight game with a foot injury.

Smith completed 15-of-24 passes for 140 yards and an interception, and San Francisco (9-2) was held without a touchdown for the first time this season. Smith never could get into a rhythm against an aggressive defence that rarely let him set up in the pocket.

“It’s tough to get ready for a defence like that in a short week. They do so many things,” he said. “They’re a great front. At home with the crowd noise, they were teeing off.”

Terrell Suggs had three sacks for first-place Baltimore, which moved a half-game ahead of the Pittsburgh Steelers in the AFC North.

“That’s always the game plan, to get after the quarterback, but I think the No. 1 game plan was to win the Harbaugh Bowl,” Suggs said. “Coach tried to downplay it — act like it’s not me against my brother, this is the Ravens vs. the 49ers and let’s get win No. 8 and make sure our destiny is in our own hands — but it was really important to him. We as a team went out there and really wanted to win for him.”

Baltimore broke a 6-6 tie with a 76-yard, 16-play drive that lasted more than 7 1/2 minutes and ended with an 8-yard touchdown pass from Joe Flacco to tight end Dennis Pitta with 14:56 left. Flacco went 4 for 4 for 34 yards and a touchdown on third down during the drive.

“When you have that kind of game plan — your line being so efficient on third downs — you have to come through,” Flacco said.