Among the people most shocked when the 49ers took Aldon Smith in the NFL draft Thursday night was Aldon Smith.

“I had no idea,” he said. “This is amazing, man.”

The 49ers made a mockery of the mock drafts by taking the Missouri defensive end with the No. 7 pick. In doing so, they bypassed Smith’s more famous teammate, Blaine Gabbert — and all other quarterbacks, for that matter — to address another glaring need.

The 49ers wanted an elite pass rusher, so they targeted the 6-foot-4, 263-pound defensive end who set Missouri’s season sacks record as a redshirt freshman in 2009 with 11﻿1/2. Smith will convert to an outside linebacker in a 3-4 scheme, and the 49ers will endure his growing pains along the way.

“We’re going to go through that with him because of the talent that he has,” general manager Trent Baalke said.

Even with the screaming need for a better pass rush, the selection of Smith was so unexpected that it looked like a mirage. A writer from the Philadelphia Daily News immediately floated the possibility, via Twitter, that Smith would be shipped to the Eagles for quarterback Kevin Kolb once the NFL’s labor situation allows.

“No, there’s no chance of that,” 49ers coach Jim Harbaugh said when asked if Smith will be traded. A second team source also denied that Smith will be dealt.

That’s fine with Smith, who sounded eager to give the 49ers their long-awaited pass-rushing threat. He said he aspires to play in the mold of NFL stars Julius Peppers and Clay Matthews. Asked to describe his game, Smith said: “I’m an athletic player. I’m a pass-rush guy who gets to the quarterback.”

The Raytown, Mo., native broke the season sacks record at Missouri held by Justin Smith — his new 49ers teammate. (The new Smith is aware of the old one but said he doesn’t know him yet.)

Aldon Smith managed only 5﻿1/2 sacks last season, but he boosted his draft stock nonetheless by battling through a fractured right fibula. Smith missed three games and was hampered in several others — but he remained productive, even with a limp.

“I think it let people know that I had heart and that I love the game and that I’m not a wimp — that I’m a tough guy,” Smith said on a conference call with Bay Area reporters.

Harbaugh praised the way Smith played through pain last season and said: “I’m really impressed with him as a person. He’s an All-American young man.”

The 49ers haven’t had an elite and consistent pass rusher since Charles Haley. Smith could be the heir apparent to Manny Lawson, the versatile outside linebacker who has been used creatively off the edge. (Lawson is in line for free agency).

Baalke said that Smith, 21, might not be ready to make an immediate impact but added, “We feel good about him developing sooner rather than later. He is not a project.”

Harbaugh raved about Smith’s wingspan, calling it “Dwyane Wade-like,” in reference to the NBA star. (At the combine, Smith’s wingspan was measured at 83﻿7/8 inches). The coach said the long arms give Smith incredible balance coming around the edge, noting that the player rarely gets knocked to the ground.

Besides the sack marks he set in ’09, Smith also set the Big 12 freshman record with 19 tackles for a loss, topping the mark of 16 by Oklahoma’s Tommie Harris in 2001.

Early in his freshman season, Smith had three sacks in a game. That’s when Missouri defensive-line coach Craig Kuligowski pulled the kid aside.

“He told me that I had a gift,” Smith recalled.

The 49ers still need a quarterback and no doubt will take one over the next six rounds. Among the notable passers still on the board are Ryan Mallett of Arkansas, Andy Dalton of TCU, Colin Kaepernick of Nevada, Greg McElroy of Alabama and Ricky Stanzi of Iowa.

Were the 49ers tempted to take a quarterback at No. 7?

“When it came to our pick we picked the player that we thought could help our football team the most,” Harbaugh said. “I think that’s the relevant thing. Anything else is really not relevant.”