Matthew Mulligan wanted another chance to play tight end in the NFL.

And he’s getting it from the guy who gave him his first one.

Mulligan, the West Enfield native who played two years of football at the University of Maine, signed with the Buffalo Bills and their new head coach, Rex Ryan. Mulligan played three years for Ryan when he was the head coach of the New York Jets.

“I don’t know if that meant a lot (to Ryan) but I’m sure it played a little into their decision to sign me,” said Mulligan, who played for the New England Patriots in 2013. “For me, I will always have the deepest gratitude for him. He’s the coach who gave me my first shot. He played me a lot of reps and I’ll always be thankful for that.”

Mulligan, who has a home in Lincoln with his wife, Stephanie, and their two children (2-year-old Clara and 8-month-old Emmett), will participate in his eighth NFL training camp when the Bills open on July 31. Three months ago, he wasn’t sure he’d be on an NFL roster.

While lifting weights in early March, Mulligan dislocated the lunate bone in his right wrist so severely that it was shoved back into his hand. Mulligan, 30, was lifting 400 pounds. “I caught it wrong, my elbow smashed on my knee,” he said. “The weight collapsed my wrist.”

Mulligan, known as a relentless blocker, was a free agent. He had played for three teams in 2014 – the Chicago Bears, Arizona Cardinals and Tennessee Titans – after leaving the Patriots. And he knew no team was going to sign him until he proved he had recovered from surgery. He also knew he couldn’t rush things.

“We had to be smart,” he said.

Mulligan credits social media with his new contract. Once he was able to resume workouts, he taped them and put them on Twitter and various social media platforms. “Teams got wind of the stuff I was doing,” he said. “This is when the Internet really helped.”

Last Thursday, the 6-foot-4, 270-pound Mulligan signed his contract with the Bills and was reunited with Ryan.

“He’s in a perfect situation with Rex,” said Mike DeVito, the defensive tackle for the Kansas City Chiefs and a former teammate of Mulligan’s from both UMaine and the Jets. “That’s a perfect offensive system for him to be in.”

“Rex Ryan,” said Mulligan, “is all about physicality. It’s smash-mouth football. He has that mentality.”

Jack Cosgrove, Mulligan’s coach at UMaine, said he is certain Mulligan’s previous relationship with Ryan played into the signing. “I believe that everybody in the NFL has their guys,” said Cosgrove. “Bill Belichick has certain guys he wants on the Patriots. I would be of the mindset that in this case Rex loves how Matt Mulligan works. He has a practice and workout habit that in itself will be beneficial to the team.”

DeVito, who has a home in Hampden, is Mulligan’s best friend and workout partner. They train at Mulligan’s home gym. He is also coming back from an injury – an Achilles tendon tear that ended his 2014 season in the first game. His injury has helped him realize how much football means to him.

“We say it all the time but it’s true, it really can be over in one play,” said DeVito. “My mindset going into this year is to have no regrets. I’m going to go out and have fun and enjoy football.”

Mulligan knows that his three years playing for Ryan guarantee nothing. He is one of six tight ends on the roster, including Charles Clay (a free agent from Miami) and rookie Nick O’Leary of Florida State (the grandson of golf great Jack Nicklaus). “It’s a good group of tight ends,” he said. “They all work very hard.”

He did not attend the team’s minicamp or any of the offseason team activities because he had not signed a contract.

“We needed to see if I was healthy,” said Mulligan. “I am two months ahead of schedule in my recovery and we don’t want any setbacks.”

Mulligan still sometimes finds it difficult to believe how his career has evolved. He never played football in high school – Penobscot Valley High in Howland didn’t offer it so he played soccer – and didn’t take up football until his sophomore year at Husson University. He transferred to UMaine for his junior season and that, he said, “is where I was taught how to play football and become instinctual.”

Cosgrove said Mulligan wanted to learn the game. “He was a sponge,” said Cosgrove. “And, again, he has an unquestioned work ethic, especially in the weight room, to get bigger, faster and stronger.”

And he had DeVito to push him on. “We’ve been best friends since the first day we started hanging out,” said DeVito. “I haven’t experienced that with anyone else.”

They played two years at Maine and then together with the Jets from 2009-11. Since 2010, when DeVito moved to Hampden, they have worked out together in the offseason.

Both are deeply religious and Mulligan believes God has had a hand in his career.

DeVito said that may be true, but that Mulligan shouldn’t discount his contributions.

“His career speaks to not only his talent and ability, the God-given stuff that can only get you so far, but also to his work ethic and how much he wanted it,” said DeVito. “He didn’t really play until his junior year. There are only about a dozen guys who can say they’ve done what he’s done in their careers. That shows the hand of God in his life, but also his tenacity to be the best.”