Kevin Hogan remains Stanford’s quarterback, after supplanting Josh Nunes. (David Chiu / AP)

Quarterback Josh Nunes, the heir to Andrew Luck at Stanford, retired from football Monday, his decision triggered by a freak weightlifting accident in February.

During a bench press, Nunes felt his right shoulder pop, then the weight fell on his upper body, tearing his right chest muscle.

“It was pretty gnarly,” Nunes said (via the Associated Press).

Nunes beat out Brett Nottingham for the starting job last fall, then lost it to Kevin Hogan, who led the Cardinal to the Pacific-12 championship and a Rose Bowl victory. “It’s kind of a tough way to go out,” Nunes told the AP. “Definitely faced a lot of adversity, both with health and football. Obstacles are a part of life and definitely meant to be overcome.”

Although his father told the AP’s Antonio Gonzalez that dropping the weight didn’t cause the injury, in which the pectoralis muscle had torn from the bone and screws were used to reattach it. Nunes, who is expected to fully recover, will need about a year of recovery time and he decided it was time to move on.

“I’m going to need my right hand the rest of my life,” he said.

Nunes started the first nine games last year and threw for 1,643 yards and 10 touchdowns, with seven interceptions. Nunes, who is studying management science and engineering, is scheduled to receive a master’s degree next spring.

Follow @CindyBoren on Twitter and on Facebook.