WASHINGTON — Lt. Gen. Ronald F. Lewis held a job that is little known beyond Washington. But his abrupt and public firing on Thursday called attention not only to a senior officer’s potentially career-ending scandal but also to the huge influence over military policy that his position, senior military assistant to the defense secretary, wields.

In a brief statement on Thursday, Defense Secretary Ashton B. Carter said that he had dismissed General Lewis over allegations of personal misconduct. The statement provided no details about the allegations, but military officials suggested that the firing involved an improper relationship. Extramarital affairs are a crime under the military’s legal code.

The senior military assistant is in essence the defense secretary’s right-hand man. The assistant sees almost every piece of paper that crosses the boss’s desk, including some of the most highly classified intelligence reports produced by the government. The assistant also weighs in on everything from routine personnel matters to the planning of military operations around the world.

The position also involves serving as a guide, of sorts, for a civilian political appointee who must navigate and control one of the world’s most regimented bureaucracies, and certainly its most heavily armed. The assistant translates the acronym-filled lexicon of the military, tells the secretary who served with whom, and conveys which senior officer is seen by the rank and file as a real soldier (or sailor or Marine) and who is seen as a careerist with talent for managing up.