Updated

Texas quarterback Garrett Gilbert had surgery on his right throwing shoulder Tuesday and will miss the remainder of the season, the school said.

Gilbert, a junior, started all 12 games for the Longhorns last season but was pulled in the first half against BYU on September 10 after throwing just two completions and two interceptions in eight attempts.

A statement issued by Texas said the quarterback's shoulder injury appeared to occur a week before against Rice. Gilbert is expected to make a full recovery from the surgery.

"He had symptoms, but was not affected in practice leading up to BYU. After that, it got progressively worse," said the football team's head trainer, Kenny Boyd. "We did an MRI on the shoulder last week, and after our medical staff looked at the results, we recommended that he have surgery. He spent some time talking with his family and they agreed that was the route they wanted to go."

Gilbert said in a statement that he decided to have the surgery immediately so that he could begin his rehab and be ready to play next season.

"I'm disappointed that I won't be able to play the rest of this year, but I'll be out there helping [co-offensive coordinator and quarterbacks coach Bryan Harsin] and the quarterbacks as much as I can."

Gilbert was named starter on August 29, winning a competition that also included Case McCoy, the brother of former Longhorns quarterback Colt McCoy.

Texas head coach Mack Brown had said Gilbert's experience and on-the-field leadership helped him with the job as much as anything.

The quarterback passed for 2,744 yards and 10 touchdowns with 17 interceptions last year and threw for 247 yards, one TD and two interceptions in his two games this season for the Longhorns (3-0).

"We're disappointed for Garrett that he won't be able to help us on the field the rest of this season," Brown said. "He's a tough kid that fought through some pain to continue to play, but when doctors told him the injury was something that needed to be taken care of, we fully supported him in doing that.

"We also know that Garrett is a very smart kid with a great understanding of our offense, so we're excited that he'll still be around to help coach Harsin and our young quarterbacks. He will continue to be a great leader for us helping those guys throughout the season. With his work ethic and determination, we know he'll get his shoulder back to full strength as soon as possible."