David Ousted has started 17 league matches this season. (Nick Wass/Associated Press)

D.C. United goalkeeper David Ousted, who started 17 of the first 20 matches before losing the job when Bill Hamid returned from Europe, had surgery on his left elbow and will miss at least six weeks.

The Dane, in his first season with United after five in Vancouver, has been coping with the injury for more than a month but was still able to play, team officials said. The surgery was to relieve nerve compression.

The recovery timetable would allow him to return to active duty for the last four games of the regular season.

With Ousted out, Travis Worra will back up Hamid, who reclaimed the starting job last week. Worra, 25, has spent most of the year with the second-division Richmond Kickers. He is in his fourth pro season and has made 18 MLS starts.

Steve Clark (three starts) was United’s second-choice keeper until this month, when Hamid rejoined the club from Danish club Midtjylland. Waived by D.C., Clark signed with the Portland Timbers.

Hamid started the 4-1 victory over Portland and a 2-0 triumph against New England. He is expected to be in the lineup again Sunday night against the New York Red Bulls in Harrison, N.J.

Ousted joins a small group of D.C. players unavailable because of injury: Left back Taylor Kemp (groin/hip) is out for the year, and right back Nick DeLeon (knee) is making progress after missing three months.

Read more soccer coverage:

Megan Rapinoe’s Carr Fire fundraiser brings criticism of her national anthem demonstration

Players from Spain’s La Liga threaten strike over games in the U.S.

United in talks to play two international friendlies this fall at Audi Field