During the Peninsular War, Napoleon's armies overrun Spain, and a colossal siege cannon, belonging to the Spanish army, is abandoned when it slows the retreat. French cavalrymen are dispatched to recover it.
Britain, Spain's ally, sends a Royal Navy ordnance officer, Captain Anthony Trumbull, to locate the gun and ensure it is handed over to British forces before the French can seize it again. But when Trumbull arrives at the Spanish headquarters, he finds it evacuated and now occupied by a guerrilla band led by the French-hating Miguel. [Miguel] shows Trumbull the cannon's location at the bottom of a steep ravine and declares he will help move the massive weapon only if it is first used against the fortified walls of Ávila, a city he is obsessed with capturing. As the two men work together, their rough alliance breeds mutual distrust. Part of their tension comes from Miguel's mistress, Juana, who falls in love with Trumbull.
Meanwhile, the brutal General Jouvet, the French commander of the forces in Ávila, orders the execution of ten Spanish hostages daily until information on the cannon's whereabouts is surrendered. The cannon, in fact, has been recovered and begins a grueling journey across Spain toward Ávila.
The guerrilla band grows, and the mission nearly derails when General Jouvet deploys artillery at a mountain pass the group must cross. With help from the local populace, they push the cannon through, suffering heavy losses; it rolls down a long hillside, becoming partly dismounted from its transport carriage.
The cannon is moved and hidden inside a cathedral while repairs are made. Afterwards, it is disguised as an ornamental processional platform during a Catholic Holy Week religious procession to slip past the occupying French. French officers are informed of the cathedral’s location, but by the time they arrive, the gun has been repaired and moved, leaving no trace that it was ever there.
When the cannon finally reaches the guerrillas' camp on the plains outside Ávila, Trumbull and Miguel prepare to storm the city. Yet Ávila is defended by formidable walls, eighty cannon, and a garrison of French troops. Trumbull explains to the assembled guerrilla force that half of them will be cut down by French artillery and rifle fire during the assault. He also tries to persuade Juana not to take part, but, having come this far, she joins the march the next day.
Trumbull repeatedly fires the siege cannon, its solid shot slowly tearing sections of Ávila's walls. Despite steep losses in the assault, the guerrillas surge through the breach and overwhelm the French defense. General Jouvet is killed, and the last French troops fall in the town square. After the battle, Trumbull bids farewell to a dying Juana and places Miguel's body at the foot of Ávila's patron saint Saint Teresa. With the cannon secured for its long journey to England, Trumbull departs Ávila, carrying troubled memories from his journey across Spain.