Nearly four years after he squared off against federal agents in an armed showdown over cattle grazing, Nevada rancher Cliven Bundy on Monday walked out of court a free man—the finale to a saga that captured national attention and spotlighted long-running tensions between Western ranchers and the federal government.

Mr. Bundy, his two sons and another defendant were cleared of criminal charges by a judge who dismissed their case in part because of “flagrant misconduct” by prosecutors.

...