Miami Dolphins quarterback David Garrard will undergo arthroscopic knee surgery and is expected to be sidelined two to four weeks, his agent said Friday.

The recovery timetable likely takes Garrard out of the competition to win the starting job for the season opener in four weeks.

Garrard's knee had been bothering him for a few days, and following an examination he decided to undergo surgery rather than deal with the issue throughout the season, said his agent, Al Irby.

"He had been feeling some soreness, and he got it looked at," Irby said. "He could have played on it, but they'd rather do the surgery now to make him more comfortable, rather than fool around with it."

The decision came with Garrard slated to start in his Dolphins debut Friday night when they played Tampa Bay in their exhibition opener.

Instead, the competition for the starting job is narrowed down to holdover Matt Moore and first-round draft pick Ryan Tannehill. Moore replaced Garrard as the starter against the Bucs.

Garrard, 34, started for Jacksonville from 2005 to 2010. He underwent back surgery in October and sat out last season, then signed with Miami in March.

He hasn't had issues with his knee in the past, Irby said.

Garrard's best season was in 2007, when he threw 18 touchdown passes and only three interceptions. He topped 3,500 yards passing in 2008 and 2009, and he's 39-37 as a starter in nine seasons, all with Jacksonville.