Ryan Bates arrived in Buffalo in the summer of 2019 as a rather anonymous offensive lineman acquired in a nondescript swap of roster depth. He went undrafted in April after leaving Penn State a year early, signed with his hometown Eagles as a free agent, and was traded during training camp to the Bills for a defensive end who would be released three weeks later.

And as Bates tried to impress his way onto Buffalo’s roster, a new teammate mistook his name and called the offensive lineman “Rick.”

“I didn’t know a lot of the guys and it just kind of happened,” Bates said. “I was like, ‘Yeah, Rick. That’s me.’ ”

It quickly became his nickname and Bates, who starred at Archbishop Wood after quitting football in the seventh grade, embraced it.

» READ MORE: New Eagle Ryan Bates is fulfilling a childhood dream after starring at Archbishop Wood, Penn State

But two seasons later, the player who was once on the fringe of the roster is helping the Bills dream about their first-ever Super Bowl as they prepare for Sunday night’s AFC divisional round clash in Kansas City. Bates entered the starting lineup in December, helping to solidify the team’s now dominant offensive line. No one is mistaking his name anymore.

“Coming to Buffalo is the best thing that ever happened to me,” Bates said. “Look where I’m at now. I couldn’t imagine playing in the divisional round as a starting left guard. If you would’ve told me that a couple years ago, I would’ve called you crazy. It just goes to show you that if you put your mind to it, you can accomplish anything.”

Bates was one of the nation’s top lineman at Archbishop Wood as coaches from all over the country flocked to Bucks County to see him. He was a 6-foot-5, 275-pound four-star recruit with the athleticism to handle any spot on the offensive line.

Steve Devlin, the architect of five state champions, built a dominant program at Wood by running the football behind powerhouse lines. Bates, the former Vikings coach said, was the best lineman he ever had.

“When he was getting recruited, I’ll never forget that the first play we put on his highlight film was him running down the field to block a safety to make a touchdown block for our team,” Devlin said. “But he’s beating the running back down the field. You knew that he was going to be destined for greatness.”

Bates’ career nearly ended after two years of CYO football for the Bux-Mont Saints. He loved watching the Eagles on TV but playing — “I was a pudgy kid and out of shape,” Bates said — just wasn’t fun so he quit.

When Bates arrived to Wood, he gave the game another chance after spotting the football players in the auditorium during a presentation for extra-curricular activities. Some of his buddies were already playing and the seniors — seeing the size of Bates — pushed him to join the team. A year later, Virginia offered him his first scholarship and Bates said his love was reignited.

“Once the switch went off and he knew he was a big, strong kid and he could do what he wanted against you, he was dominant,” Devlin said. “He beat everyone he went up against.”

Bates left Wood with back-to-back state titles and headed to Penn State, starting all 14 games as a redshirt freshman for a Nittany Lions team that reached the Rose Bowl. He played three years in Happy Valley, moving all over the offensive line and clearing holes for future NFL running backs Saquon Barkley and Miles Sanders.

“He had the feet and athleticism to play tackle, had the power and girth to play guard, and had the intelligence and quickness to play center,” Penn State head coach James Franklin said. “In college football, you can’t have enough of those guys.”

Bates left school after his junior season and did well at the NFL Scouting Combine but did not hear his name called among the 254 draft selections in April of 2019. Bates wasn’t sure if he would be picked, but he invited friends and family over to his parent’s home in Warrington for the draft’s third day in case he was a late-round choice.

His phone rang during the sixth round. Perhaps, Bates thought, this was his call to the NFL. It was instead a prank from his buddy in the basement.

“He said something like, ‘Where’s the beer at?’ or ‘Where’s the toilet paper in the bathroom?,’ ” Bates said.

Bates latched on with the Eagles as an undrafted free agent, keeping his NFL dream alive but knowing there was no promise that it would stay burning for long. The Eagles used their first-round pick on Andre Dillard, an offensive tackle, and Bates knew he was fighting with a cast of players for one of the final roster spots.

“I was mentally preparing to be undrafted,” Bates said. “So I kept telling myself that wherever I go, I’m going to have to work and grind and make a name for myself because undrafted players don’t get the benefit of the doubt as much as drafted players.”

Bates learned as much as he could that summer from linemen like Jason Kelce, Jason Peters, Brandon Brooks, and Lane Johnson. Two years earlier, he was in the stands when the Eagles won the NFC Championship. And now he was learning from his heroes.

“A Philly guy playing for a Philly team. I was living the dream,” Bates said. “Anybody from Philly would give their left leg to play for a Philadelphia organization, especially football.”

He attached himself to Kelce, who started his college career as a linebacker before becoming one of the NFL’s elite centers after entering the league as a sixth-round pick. Kelce offered a Hall of Fame education, teaching Bates how to snap the football and lending him the knowledge he gained from his linebacking days on how to decipher defensive coverages.

“Coverage is one of the last things you learn as an offensive lineman. But for him, since he was a linebacker, it was one of the first things he learned,” Bates said. “So he uses that knowledge to his advantage at center and I tried to study him and watch how he did things. To this day, when I’m snapping underneath a shotgun, I hold it in the same spot when I’m playing center because that’s how he taught me as a young guy.”

Later that summer, Bates was on FaceTime with a friend — the prankster from draft night — when he received a call from an unknown number. He ignored it. And then the text came. It was Howie Roseman asking for Bates to give him a call.

Bates ended his FaceTime, called Roseman, and learned he had been traded after playing one preseason game to the Bills for veteran Eli Harold. The Eagles had several offensive lineman ahead of Bates, who was one of four undrafted linemen in camp, so they tried flipping him for depth on their defensive line. Harold, who has not played in the NFL since, was cut at the end of camp.

Bates’ girlfriend was on her way for a date to the movies. Instead, she drove him to the airport. Bates expected his camp with the Eagles to end with either him being cut or placed on the practice squad. The trade, which initially stung, provided a chance to make an NFL roster.

“It’s not just about your talent sometimes. It’s also about the fit and your need,” Franklin said. “He gets to the Bills and opportunity presented itself and he took advantage of it. But I’m not surprised because he just had so many desirable traits. If you listed out all the attributes that you’re looking for in that position, he really had them all except that he wasn’t 6-6.”

» READ MORE: New Eagle Ryan Bates is fulfilling a childhood dream after starring at Archbishop Wood, Penn State

Bates made the Bills roster as a rookie, spending most of his first two seasons as a special teamer and bouncing around the offensive line. The player who didn’t have the work ethic to survive CYO football was now determined to hang in the NFL.

He’s played six positions — left and right guard, left and right tackle, center, and tight end — as the versatility he showed in high school and college helped open the door in Buffalo.

“It didn’t happen overnight. Obviously, it was a lot of hard work,” Bates said. “When I first got here, I was the low man on the totem pole. I was holding all the bags and doing whatever I could to get noticed. I stuck my nose in the playbook and learned everything I could.”

And then a need arose in December as Bates started Week 16 at right guard after the Bills placed several lineman into COVID-19 protocols.

It was Bates’ first start since college. He moved over to left guard during the game when starter Ike Boettger suffered a season-ending Achilles injury and has not left the lineup since. He’s started four straight games and the Bills are rolling behind their new-look offensive line.

Quarterback Josh Allen has not been sacked in four straight games and the Bills are averaging 172.7 rushing yards per game during that stretch. The Bills scored touchdowns on their first seven drives last Saturday in a 47-17 rout of the Patriots in the wild-card round. They enter Sunday with the look of a complete offense.

“We’re dangerous right now. Last weekend, we were firing on all cylinders, 7 for 7 and finished the game in victory formation. You can’t play a better game than that,” said Bates, whose blocking last week was well graded by Pro Football Focus. “We’re a bunch of tough dudes on the o-line. A bunch of dudes battling some physical injuries, and I would hate to play us in the homestretch here going to the Super Bowl. I would hate to play us. I have such confidence in this team, especially with a guy like Josh Allen at quarterback. Come on. We’re dangerous.”

Devlin watched last weekend from his basement as his former player — the one he helped persuade to give football another chance — helped clear the way to a dominant postseason win. Watching gave him goosebumps, Devlin said.

Bates was a top high-school recruit, a state champion, and a college star but he still had to fight his way to an NFL roster and wait his chance for a starting job. He’s an important piece this month for a team with Super Bowl aspirations. And now they know his name.

“Everyone’s story and everyone’s journey is different,” Franklin said. “You have to embrace your story and embrace your journey and maximize it and learn from it and evolve. I think Ryan is a great example of that and I’m super proud of him. But I’m not surprised one bit.”