I would like to take a ham from Spain to Guatemala, with a layover in Miami.
Is this permitted? Aside from the possibility of import duties, are there any sanitary restrictions that would make it impossible or complicated?
From the US Customs and Border Protection site:
Meat, milk, egg, poultry, and their products, including products made with these materials, such as dried soup mix or bouillon, are either prohibited or restricted from entering the United States, depending on the types of animal diseases which occur in the country of origin. Fresh (chilled or frozen), dried, cured, and fully cooked meat is generally prohibited from most countries. Canned meat is allowed entry, except beef, veal, lamb, mutton, venison, elk, bison, etc., from countries affected by bovine spongiform encephalopathy (BSE).
Pork should be commercially canned and labeled in unopened containers. Pork and pork products are not admissible from Mexico, except for cooked pork in small amounts for a meal.
Looking at the USDA lists, Spain almost always has an asterisk, with remarks about even though Spain is free of the common meat diseases, Spain is near countries that are not, and/or imports meat from countries which are not (known to be disease free.)
Personal opinion is you could try, but ensure you declare it, and take your chances. A CBP officer may confiscate it, and then again, may not.
As far as Guatemala goes, according to Frommers
What You Can Bring into Guatemala -- Visitors to Guatemala may bring any and all reasonable goods and belongings for personal use during their stay. Cameras, computers, and electronic equipment, as well as fishing and diving gear for personal use, are permitted duty-free. Customs officials in Guatemala seldom check arriving tourists' luggage.