Valdez is Coming
(1971)

An evil rich rancher named Tanner (Jon Cypher) has taken up with a lady named Gay (Susan Clark).  Gay's husband was murdered. Tanner wants to catch the murderer, to clear his name.  They have a man holed up in a cabin.  

Local sheriff Valdez (Burt Lancaster) wants to talk to the man and bring him in alive.  When Valdez goes to the door, gunfire erupts and Valdez shoots the man.  It is the wrong guy, Valdez shot an innocent man.  Valdez wants Tanner to give the man's Indian wife money to go home to her people.  Valdez is polite but persistent.  Tanner gets fed up, and has his goons tie Valdez to a cross and leave him to die in the desert.  Tanner's hired gunslinger, Davis, unties Valdez in the night.

Valdez puts on his old military uniform and arms for battle.  He kidnaps Gay.  He kills off Tanner's men one by one.  Occasionally, Valdez sends an injured man back to tell Tanner, "Valdez is coming".  Gay reveals to Valdez that she killed her husband to be free of him.

Tanner's men finally surround Valdez.  Tanner orders them to shoot.  The men refuse.  They respect Valdez, and leave Tanner to fight his own battle.

Thanks Joseph C!