Niners general manager Trent Baalke said one of his favorite players in the draft was a lineman who was named his conference’s defensive player of the year in 2015.

No, not DeForest Buckner.

Two days, four rounds and 135 picks after the 49ers used the No. 7 pick on Buckner, they used a fifth-round selection on Appalachian State’s Ronald Blair, the Sun Belt Conference Defensive Player of the Year who was expected to be drafted earlier.

NFL Network analyst Mike Mayock had a third-round grade on Blair. CBS Sports analyst Dane Brugler termed him “one of the top-40 talents in this draft class.”

“Why was he still there?” Baalke said Thursday on KNBR. “I don’t have that answer. He was one of my personal favorite players as we went through the process, and the coaching staff really liked watching him play.”

Still, despite Baalke’s fondness for Blair, he didn’t pull the trigger a round earlier when he drafted LSU cornerback Rashard Robinson at a spot where he said he considered Blair.

So why did the 49ers and 31 other teams ignore Blair for four rounds? Blair, after all, was a versatile four-year starter who played four defensive-line positions and had 32 tackles for loss and 13.5 sacks in his final two seasons. In addition, he eased concerns about excelling against lesser competition by collecting eight tackles and two sacks last year against Clemson, which lost to Alabama in the BSC national title game.

Asked about his draft fall, Blair cited his combine performance, which he thought was mediocre because he had a hamstring strain.

“I just didn’t want be one of those people that sat out all the workouts,” Blair said. “I wanted to show people that I could do them. It wasn’t my best foot” forward.

Michael Conroy/AP

Perhaps Blair fell a bit short in Indianapolis, but his tumble could have more to do with the fact that he’s, well, short. Only 11 of the 64 defensive linemen at the combine were shorter than the 6-foot-2, 270-pound Blair.

“I just have to make sure I’m technique-sound,” Blair said, “because I’m not one of those 6-7 guys that can tower over people.”

Blair, whose 34-inch arms helped compensate for his size, smiled when asked where he might have been drafted if he was 6-5. But then he noted his physical limitations forced him to develop in other areas. For example, Blair’s 32 reps of 225 pounds on the bench press tied for second among defensive linemen at the combine and ranked fourth overall.

“I probably wouldn’t play the same way I play if I was 3 inches taller,” Blair said. “You learn how to play the game through what you’re given. That’s my thing. I learned how to play with my 6-2 height and I think that really helped me.”

Blair was a two-time team captain, and Baalke said he has “A-plus character,” but he had two alcohol-related incidents in college. In September 2013, he was charged with driving after consuming alcohol underage and driving without a license (his blood-alcohol content was 0.04). In June 2012, he was issued a citation for underage consumption of alcohol.

On Thursday, Blair didn’t sound bitter about his draft fall, but just grateful it didn’t continue. He didn’t expect the 49ers to put an end to the waiting because he didn’t have any contact with the team after meeting at the combine.

“It was a surprise call, but I was glad to get that call,” Blair said. “I was very glad to get that call from them.”

Eric Branch is a San Francisco Chronicle staff writer. Email: ebranch@sfchronicle.com Twitter: @Eric_Branch