The Adventures of Don Juan
(1948)

Spanish nobleman Don Juan de Maraña (Errol Flynn) is famous as a womanizer.  When he is caught with an English lady just before her wedding to an ambassador, it causes an international incident.  He is recalled to Spain to be sentenced by the king and queen.  Don Juan wins over the queen, who decides his punishment will be to work for the monarchs. His only practical skill is as a swordsman, so he is put in charge of the fencing school.  The king has a dwarf as jester.  Don Juan is kind to the dwarf when everyone else ridicules and mistreats him.

The Duke de Lorca is the king's main advisor.  He is an evil man who manipulates the king for his own advancement.  The Duke tries to take over the kingdom, holding the king and queen prisoner in the castle.  When the queen refuses to be his puppet, he plans to execute her.  Don Juan has been imprisoned.  Don Juan's friends enter the prison disguised as monks to give him the last rites.  They help Don Juan escape, and free other loyal prisoners.

They do not have enough men to fight the Duke's guards.  Don Juan calls in his fencing students, who are all loyal to him.  The dwarf is a great help as he knows the secret entrances to the castle, and all the hidden passageways.

Don Juan kills the Duke in sword battle.  The fencing students defeat the guards.  The king and queen are restored to power.  Don Juan leaves the country, as he loves the queen but can never be with her. 

Thanks Joseph C!