Bring up David Mayo’s name and the Giants will rave about his smarts, his desire and how seamlessly he has fit on the team.

Ask the inside linebacker about the Giants and he will do the same: praise his teammates and coaches and talk fondly about the organization.

For both parties, it has been a perfect match — one Mayo didn’t see coming. He signed a two-year contract with the 49ers in the offseason. He moved his family to the Bay Area. Then, on Aug. 31, he was cut.

“It was a blessing in disguise,” the Oregon native said Friday, adding, “Life is funny.”

That’s because he was a Giant two days later, signed by general manager Dave Gettleman, and was starting at inside linebacker by Week 4, as a rash of injuries hit. He was only supposed to be a stopgap. But from the time Mayo broke into the league with the Panthers, he’s never acted like a backup. He always has prepared as the starter, so he learned the defense faster than expected.

“A part of being a pro is even when you don’t know when your opportunity is going to come, you have to be ready when your opportunity does come up,” the 6-foot-2, 240-pound linebacker said. “That’s what I’ve focused on my entire career.”

Even with Alec Ogletree returning last week, Mayo didn’t lose his spot. Instead, Tae Davis remained inactive against the Patriots and Mayo thrived, notching a career-high 13 tackles and half a sack — the first sack of any kind in his five years in the NFL. Sunday against the Cardinals at MetLife Stadium, he will make his fourth start as a Giant after four career starts in his first four seasons in the league.

“I love what David Mayo has done, I really do,” defensive coordinator James Bettcher said. “He’s come and worked his tail off. David’s another guy that loves the game. This guy really loves the game, he’s tough, he’s physical.”

Mayo stopped short of praising that performance, despite the eye-popping numbers. He talked about what he didn’t do: a few missed assignments, a blown tackle on the Patriots’ first drive. There’s always room to get better, never time for complacency.

“No matter if you had a good performance or a bad performance, you got to move on from it because it doesn’t guarantee anything,” he said.

That approach has gotten him pretty far, from a guy who didn’t land a single Division I scholarship out of high school, who had just one option — Texas State — after junior college and had shown little evidence he had pro potential until his breakout senior year led him getting drafted by Gettleman in the fifth round in 2015. He never veered from the path, despite the long odds. When asked when he first began thinking realistically about the NFL, he said: “Fourth grade.”

Mayo was serious. It was then he made it a goal of his. It has taken him on a journey, from Scappoose, Ore., to Santa Monica, Calif., and San Marcos, Texas, to the Panthers and 49ers, before his unlikely rise as a starting inside linebacker for the Giants.

“It’s wild, but it’s a blessing,” Mayo said. “A lot of guys have the same dream I did. And one thing goes wrong, or one mess-up, or you’re one injury away from that dream not being achieved. One call away from it not being achieved. If Texas State had not given me my offer, the only school that did, who knows where I would be. Or if I was at different [junior college] would I succeed there? You just never know.

“This whole journey is just crazy, so I’m very blessed.”