DETROIT -- Nine words from San Francisco 49ers coach Jim Harbaugh said it all Sunday.

"I feel like something special is really brewing here," he said.

There can be no sane rebuttal after the 49ers moved to 5-1 for the first time since 1998 with a 25-19 victory over the previously 5-0 Detroit Lions at Ford Field.

The 49ers are one of the best teams in the NFL by just about every measure, but especially by this one: They were far from perfect on a lot of fronts Sunday, and still they snapped the Lions' nine-game winning streak dating to last season.

Was there ever any doubt, 49ers fans, when Alex Smith took the ball from center on fourth-and-goal with less than two minutes remaining and the 49ers trailing, 19-15? Hell, yes, there was doubt. But it's dissipating quickly.

Smith to Delanie Walker on a tight end slant, with two-time Pro Bowl back Frank Gore watching from the sideline? Yep, that was the winning play.

"You don't see that too often, do you?" Walker said from a deserted 49ers locker room, where he appeared to be savoring the result a little longer than the others.

There was enough savoring to go around.

"It's amazing to see the transformation," All-Pro linebacker Patrick Willis said.

Vic Fangio, the 49ers' defensive coordinator, called this effort the finest on defense he could recall being associated with. Harbaugh concurred. And in an unusual postgame move befitting the occasion, the 49ers relocated the postgame interview session for Willis from the locker room to the podium where head coaches and quarterbacks field questions.

Willis spent most of his afternoon blanketing tight end Brandon Pettigrew in coverage, limiting him to 42 yards on eight receptions, including a 16-yard touchdown against excellent coverage. The 49ers sacked Matt Stafford five times, allowed only one touchdown in three goal-to-go situations, and stopped the Lions 13 of 15 times on third down. They also became the first team this season to hold Calvin Johnson without a touchdown reception. If the 49ers were going to lose, they weren't going to let Johnson beat them.

The 49ers could afford to drop defenders into coverage because their defensive front, led by the old (Justin Smith) and new (Aldon Smith), consistently got pressure without blitzing. Justin Smith, credited with 1.5 sacks and three quarterback hits, beat double-teams to pressure Stafford even when the 49ers rushed only three. Aldon Smith had two sacks, including one for a safety.

Fangio sent four or fewer pass-rushers on all but one of Stafford's 57 dropbacks, according to ESPN Stats & Information. Aldon Smith has five sacks over the past three weeks, all when the 49ers rushed four or fewer. For the season, San Francisco has rushed fewer than five on 77.7 percent of opposing teams' dropbacks.

And, unlike in Week 2, when the 49ers blew a 10-point fourth-quarter lead to lose against Dallas in overtime, their grip in this one remained as tight as a Jim Harbaugh post-game handshake.

"That Cowboy game was a learning lesson for us," cornerback Carlos Rogers said. "We played four quarters, but we didn't play into overtime."

The 49ers have now won three road games in the Eastern time zone, with each game featuring a fourth-quarter comeback. They've gone 3-0 under Harbaugh in non-division games kicking off in the ever-challenging 10 a.m. PT time slot, up from 2-25 over the previous six seasons. They've dominated a 3-1 team at home (48-3 over Tampa Bay last week) and gutted out close ones, too.

Yeah, there's something special going on here.

Alex Smith said he couldn't have known all that was missing from past 49ers teams until he experienced what this team possesses.

"The locker room is what jumps out at me," the seventh-year quarterback said. "Just that -- so different. The commitment level, the sacrifice, guys are just different and it's fun to be a part of. They just don't quit and it shows up on game day."

It showed up in the fourth quarter, for sure.

Ted Ginn Jr.'s 40-yard punt return with 5:43 remaining set up the 49ers at the Detroit 35-yard line. Five consecutive running plays advanced the ball 25 yards. Finally, on fourth down, the 49ers lined up Walker wide to the right and receiver Michael Crabtree in the slot. Harbaugh and offensive coordinator Greg Roman had installed the play, Dart Left, especially for this game.

Crabtree ran a wheel route. Walker ran the slant.

"We knew they didn't know how to line up when me and Vernon split out," Walker said. "They always bring a safety out or a linebacker out and pull the corner up. He's going to play on his toes. It gave me a quick option, one-step slant, went right across the middle. The safety was inside, he jumped it. He seen me come across. But Alex just bullied it in there. I made a body catch."

The play bought redemption for the third-quarter interception Smith had thrown following what he termed a miscommunication. The Lions converted the gift into the go-ahead touchdown. But they still failed to reach 20 points for the first time since Week 14 last season.

The 49ers' defense gives them a margin for error that arguably doesn't exist for any other team in the NFC. That defense allowed them to overcome a lost fumble on their first offensive play, and much more:

Repeated penalties for false starts, each fueling the crowd "like gasoline on a fire" (Alex Smith's words);

Questionable play-calling, reflected mostly in underusing Gore, who carried 15 times for 141 yards, but not at all for long stretches;

Fifteen total assessed penalties, ranging from the frustrating (encroachment on third-and-1) to the inane (Dashon Goldson kicking the ball after a play) to the puzzling (Harbaugh challenging an unchallengeable play);

The interception Smith threw in Lions territory with 1:54 left in the third quarter of a game the 49ers led, 15-13.

There were other imperfections, but there's little sense in dwelling on them except to illustrate the clear potential for improvement. The 49ers are 5-1 and ascending. They play three of their next four games at home following a bye. They'll welcome back receiver Braylon Edwards just as Michael Crabtree is coming off a nine-catch game.

"It is something special going on," Rogers said.