Jim and Artie ride into a town in Mexico leading Jack O'Diamonds, a gift from President Grant to President Juarez. They are met by Captain Raoul Fortuna of the 5th Mexican Regiment and his men, who are there to escort the agents on the three-week trip to Mexico City. Raoul warns them that there are pro-Emperor forces that want the horse so that they can destroy the relationship between the U.S. and Mexico. The captain has his men take the horse to the stables while he goes to the telegraph office to wire ahead. They're unaware that an older Mexican man has been watching them, and the horse, with great interest.
As the agents go into the local hotel, a man shoots at them from the balcony and a Mexican captain kills him. The newcomer introduces himself as Captain Raoul Fortune, and the agents realize that they've been tricked. They run outside just in time to watch the older man, his cohorts, and the fake Fortuna ride out with Juarez's horse.
As Jim and Raoul ride across the desert on the trail of the thieves, two of the Emperor's soldiers, Gregorio and Antonio, watch them from the rocks. They realize that Jack O'Diamonds has been stolen and figure they and their men should get the horse and embarrass Juarez.
When Jim loses the trail, he returns to the town that night. A local bandit, Enrique Garcia, breaks him into his room and holds him at gunpoint. He offers to lead Jim to the horse in return for $100. When Jim agrees, Enrique tells him to meet him outside of town the next day at sunrise and he'll give him the map and then leaves via the window.
The next morning, Jim arrives at the rendezvous and discovers that Enrique has been strung up by his fellow bandits, tortured, and left for dead. Enrique tells Jim that the older man, El Sordo, strung him up and stole the horse. He asks for his money and Jim obliges, and Enrique gives him the map before dying. Two pro-Emperor soldiers ride down on Jim, who shoots them down. Captain Gregorio and his men arrive, but Gregorio tells his men to top, figuring that Jim will lead them to the horse.
As Jim follows the route on the map, Artie and Raoul discover that he's left and follow his trail. They find Enrique's corpse and Raoul confirms that he worked for Sordo. However, Artie finds the spurs from one of the dead men and confirms that they belong to French Lancers, confirming that they support Emperor Maximillian. When Raoul warns Artie that Sordo is considered a legend among the locals, the agent gets an idea.
Jim follows the map to Sordo's lair and goes ahead on foot. He quietly takes out one guard up on the cliff and then looks down into the camp. Sordo has the horse, and is busy torturing a man. Jim lowers himself down on a line and approaches the camp, claiming to be a traveler in need of food. The suspicious Sordo agrees and Jim asks after the tortured man. The bandit leader explains that the man is a traitor who served with Maximilian during the revolution. Jim offers Sordo a Cuban cigar and explains that he's looking for a rare Arabian horse, that just happens to look like the one that Sordo has. Sordo has no interest in turning it over and prepares to have Jim killed, only to discover that his cigar is smoking. It explodes and Jim takes advantage of the confusion to toss his own exploding cigar. He then rides off with Jack O'Diamonds after freeing the other horses, and Sordo vows to get his horse back.
Artie and Raoul returns to the hotel. While the captain complains about Jim going off on his own, Artie queries him about a local criminal, Pancho.
Sordo and his men continue their pursuit, but the bandit leader soon realizes that Jack O'Diamonds can outride them. He orders his men to return to camp on foot with their saddles while he takes their horses and rides in relay to catch up.
Artie disguises himself as Pancho and goes to the local cantina. He flirts with the saloon girl, Isabel, and gets her to reveal where he can find Sordo's camp. As Artie prepares to leave, three men come in. Their leader, Chico, is surprised to discover that Pancho is there since he killed him three days ago. Artie uses a rigged bottle to make a smoke bomb and escape.
After riding two horses to exhaustion, Sordo finally catches up to Jim at a watering hole. The bandit leader holds Jim at gunpoint, but the agent points out that the Emperor's soldiers are behind them and closing in. Sordo ruefully admits that they have to work together to protect "his" horse, and the two men take cover as the soldiers open fire. Jim and Sordo are able to hold the soldiers off, but sunset and the chance to slip away is still an hour away. Jim shares out his special cigars with Sordo and the two men drive off the soldiers. However, two of the soldiers manage to drive off Sordo's horse. Sordo makes it clear that comes sunset, he plans to ride off with Jack O'Diamonds.
Artie and Raoul follow Isabel's directions and ride toward the bandit camp.
As Jim and Sordo camp for the night, Sordo hears a wolf's howl and explains that he kills to survive when he has to. When Jim wonders why he stole the horse, Sordo explains that it is worth more than his life, a life of ugliness, and it's the most beautiful thing that he's seen. He assumes that Jim is delivering it for some wealthy patron and draws his knife. However, when Jim anticipates him and draws his gun, Sordo cuts off some tobacco with the knife. The agent tells him that he's mistaken and the horse is a gift for President Juarez.
The next day, Jim and Sordo manage to get away riding together on Jack O'Diamonds. The bandit chief spots a canyon they can use for protection. With Jack O'Diamonds exhausted, Jim realizes they have no choice. Meanwhile, Captain Gregorio continues his pursuit, figuring that when the horse dies, he and men can easily kill Jim and Sordo.
Once they get into the canyon, Jim says that one of them has to stay and hold off the soldiers while the other delivers the horse to Juarez. Sordo coldcocks Jim and says that he'll take the horse. After a brief fight, Sordo gets to his gun, but then tells Jim to escape while he holds off the soldiers. When Jim wonders why he's sacrificing himself, Sordo says that his life is nothing compared to Juarez. Jim hits the bandit, takes his gun, and nobly tells him to ride out instead because he can hold the soldiers off longer. Sordo calls Jim a gringo and rides off, and hears gunshots behind him. He hesitates but then realizes that he has to deliver the horse to Juarez.
Artie and Raoul arrive and spot Sordo, who catches them by surprise and captures them at gunpoint. He then tells Raoul to give him his horse so that he can leave Jack O'Diamonds with them. As he goes, Sordo apologize for the late delivery of the Arabian stallion and tells Raoul to ride off with it. Once the captain leaves, Sordo tells Artie that they both have a friend in trouble.
In the canyon, Jim does his best to hold off the lancers. Antonio gets up on a ledge and manages to shoot Jim, seemingly killing him. When the soldiers, intimidated by Jim's expertise, hesitate to rush in, Gregorio taunts them and walks toward Jim. The agent, only shot in the shoulder, shoots and kills the captain. As Antonio prepares to finish the job, Artie arrives just in time to kill the man. Sordo provides covering fire and kills one man, but another soldier shoots him before the bandit chief can finish him off.
Once the agents dispose of the remaining soldiers, Artie tells his partner that Jack O'Diamonds is safe. They go over to the dying bandit, who asks for a real cigar. He dies before they can light it for him, and Jim admits that Sordo was one of the best fighters he ever met. They turn to walk away, but Sordo gets up behind them, laughing, and reveals that he was only scratched. He draws a gun on them and tells them to hand over their money, and promises them that he'll live to rob another day. He takes one of their horses and prepares to ride off, but first tells them to tell Juarez to ride his horse in good health. As Sordo gallops away, the agents figure that Sordo will hang... some day.