BAGHDAD — In the face of spiraling costs and Iraqi officials who say they never wanted it in the first place, the State Department has slashed — and may jettison entirely by the end of the year — a multibillion-dollar police training program that was to have been the centerpiece of a hugely expanded civilian mission here.

What was originally envisioned as a training cadre of about 350 American law enforcement officers was quickly scaled back to 190 and then to 100. The latest restructuring calls for 50 advisers, but most experts and even some State Department officials say even they may be withdrawn by the end of this year.

The training effort, which began in October and has already cost $500 million, was conceived of as the largest component of a mission billed as the most ambitious American aid effort since the Marshall Plan. Instead, it has emerged as the latest high-profile example of the waning American influence here following the military withdrawal, and it reflects a costly miscalculation on the part of American officials, who did not count on the Iraqi government to assert its sovereignty so aggressively.

“I think that with the departure of the military, the Iraqis decided to say, ‘O.K., how large is the American presence here?’ ” said James F. Jeffrey, the American ambassador to Iraq, in an interview. “How large should it be? How does this equate with our sovereignty? In various areas they obviously expressed some concerns.”