JP Flynn spent Monday fly fishing under a gorgeous Montana sky, collecting his second big catch of the week.

The first came Saturday, when the Bettendorf graduate who earned all-American honors as an offensive lineman at Montana State signed with the San Francisco 49ers as an undrafted free agent.

He leaves Thursday for San Francisco and the start of a mini-camp, the first page of the next chapter in Flynn’s football career.

“It’s an exciting opportunity, something I’ve been working toward for a long time and I’m ready to make the most of it,’’ Flynn said. “It’s been a lot of hard work over the long haul, going back to my time at Bettendorf, but for it to play out this way, it’s been worth it.’’

The 49ers were among the teams that watched Flynn compete at Montana State’s pro day in late March, but he had no contact with San Francisco until his phone rang Saturday afternoon.

“They said they liked what they had seen on film and were ready to give me a chance either in the seventh round or as a free agent,’’ Flynn said. “They were going to do what they could to get me in.’’

He has spoken with 49ers offensive line coach John Benton, who welcomed him to the organization and mentioned he liked what he had seen from the 6-foot-6, 316-pound guard who recorded a 30.5-inch vertical leap and a time of 4.72 seconds in the three-cone drill, measurements that both would have ranked third among offensive linemen at the NFL Combine.

After earning a degree in mechanical engineering from Montana State in December, Flynn split his draft preparations between two sites.

He worked at the Landow Performance Center in Colorado, training there along with Stanford’s Christian McCaffrey and other draft hopefuls, and back in Bozeman, Montana with former Montana State all-American Dane Fletcher, who spent six seasons in the NFL after initially signing as a free agent.

“I learned a lot about myself during the process,’’ Flynn said. “I found myself going up against some of the best guys in the country in Denver and Dane’s experience put a totally different perspective on things. I was challenged, but I also found out that I belong.’’

Flynn had been working toward the objective since moving to Montana.

“I left the Quad-Cities on June 21, 2012 and I’ve never stopped working since I got out here,’’ Flynn said. “I’ve spent the summers here. It’s now home. Every day, the idea has been to get better and to improve.’’

There have been challenges along the way.

He underwent surgery 18 months ago to repair a torn patella tendon.

Flynn found encouragement from the support of teammates and friends on campus and in the Bozeman community as he worked his way back onto the field and toward the start of what turned into a dominant senior season on the Bobcats’ offensive line.

“The people around me taught me to never give up, to keep pushing forward,’’ Flynn said. “They helped me get back.’’

The only returning player on the Montana State front five with starting experience and the only senior on the line, Flynn earned first-team all-Big Sky Conference honors for the second time in his career.

He started 43 games during his collegiate career and earned second-team all-American recognition following his senior season.

“My senior season was my best year of football. I was working with some good young players around me and being the old guy, I was able to pass along what the older guys had taught me when I was in their situation,’’ Flynn said. “My body felt good, it felt strong and it was the type of year that I wanted it to be.’’

It was the type of year that led Flynn to his latest opportunity.

“I’m anxious to see where it all leads,’’ he said.