A pair of white police officers in Baton Rouge, La., will not be prosecuted by the state authorities in a fatal shooting of a black man there almost two years ago, the latest example of how rarely law enforcement officers are prosecuted for violence against suspects.

The Louisiana attorney general, Jeff Landry, announced the decision at a news conference on Tuesday, almost 11 months after the Justice Department declined to bring charges in the death of the man, Alton B. Sterling. Mr. Landry’s decision was widely expected, in part because officers in numerous other cases across the country have been cleared of criminal liability for using deadly force against civilians in recent years.

The Baton Rouge officers were called to the Triple S Food Mart on July 5, 2016, to respond to a report that a black man had brandished a gun and threatened someone. The officers and the man, Mr. Sterling, 37, ended up in a confrontation that left Mr. Sterling dead, prompted large protests in Baton Rouge, the Louisiana capital, and broadened the national debate about law enforcement tactics and the influence of race on American policing. It also set off a retaliatory incident in which a man shot and killed two Baton Rouge police officers and a deputy sheriff.

The officers at the scene, Blane Salamoni and Howie Lake II, face administrative punishment, including dismissal, as well as a lawsuit from the man’s family. On Tuesday, John S. McLindon, a lawyer for Mr. Salamoni, said he all but expected his client to be fired, and said he would likely appeal the decision. Mr. McLindon noted that the shooting had been determined to be justified by independent use of force experts, including two cited in the state and federal investigations.