(CNN) After a long and much-criticized search, the US Army has chosen Sig Sauer to produce its next generation of handgun, eventually replacing the current standard issue sidearm, the Beretta M9 pistol.

"Following a thorough operational test, fielding of the modular handgun is expected to begin in 2017," the Army said in a statement announcing the decision Thursday.

The M9's three decades of service since 1985 has occasionally made it the subject of derision among members of the armed forces.

"The joke that we had in the military was that sometimes the most effective use of an M9 is to simply throw it at your adversary," Sen. Joni Ernst, a former officer in the Iowa Army National Guard, said last week during the confirmation hearings for Ret. Marine Gen. James Mattis to be secretary of defense.

The multi-year effort to replace the Beretta has been slammed by members of Congress.

Read More