We study the structural properties of ultrathin Ag x Pd 1−x films on top of a Ru͑0001͒ substrate. Effective interatomic interactions, obtained from first-principles calculations, have been used in Monte Carlo simulations to derive the distribution of the alloy components in a four-monolayer ͑4-ML͒ Ag-Pd film. Though Ag-Pd alloys show complete solubility in the bulk, the thin film geometry leads to a pronounced segregation between Ag and Pd atoms with a strong preference of Ag atoms toward the surface and Pd atoms toward the interface. The theoretical prediction of this double-segregation effect is strongly supported by photoelectron spectroscopy experiments carried out for 4-ML thin films. We also show, in an additional experiment, that even in the case where initially 1 ML Ag is buried under 6 ML Pd, the whole Ag ML segregates to the surface.