During the later years of the Crusades the Christians started running out of money and went to the Jews to gets funds to pay for the holy war. Once the crusaders pushed the Moores out of the Iberico Peninsula the Jewish lenders wanted their debts collected and this became problematic for the newly victorious Christians. They made it illegal to charge interest on loans and then made it illegal to be Jewish altogether in Spain. As way to test your faith the church would summon neighbors to attend dinners with particular dishes served and these would include mostly beans mixed with pieces of pork or Jamon. If you ate the pork this meant that you were christian, if not Jewish. Special long tables were used in order have people look under to verify that no one was slipping the pork under the table . If you were caught not eating the pork it went real bad, real quick for you.
If this wasn’t bad enough someone could accuse you of being Jewish and you could be tortured up to 3 times for 15 minutes after long intervals of imprisonment with typically grim conditions and poor accommodations to say the least. Most times you could never refute or confront your accuser and ultimately those presumed guilty were taken to Plaza Major to face judgement. Judgement had no good options for the victim. To Confess meant that you would be burned at the stake outside of the city walls. To deny meant public execution in the square by burning! These were dark times. People started hanging ham legs in their window fronts to prove they were ham eating Christians in hopes of not being accused and judged. Over time the Spanish producers started perfecting the process of curing and aging the ham. They noticed the pigs eating the acorns and resulting creaminess and nuttiness of the jamon from the Iberico pigs and the superior flavor produced when all of these attributes came together.