The mechanical behavior of a thin film that is clamped to an elastically hard substrate can be compared to a bulk metal by studying the absorption of hydrogen. Since hydrogen is dissolved in interstitial sites and exerts force on neighboring metal atoms, the in-plane stresses increase with increasing hydrogen concentration. In the case of Nb-films covered with a thin Pd layer, stresses of several GPa were measured. Nb and Pd films prepared by evaporation were loaded with hydrogen. Out-of-plane strain and in-plane stresses during electrolytic loading with hydrogen were determined by performing x-ray diffraction and substrate curvature measurements. At low H-concentrations the developing stresses correspond to a clamped film expanding elastically out-of-plane only. Above a critical H-concentration the films deform plastically. In some cases the critical hydrogen concentration corresponds to the terminal H-solubility, above which the hydride precipitates by emission of extrinsic dislocation loops. For the remaining cases a critical stress is reached before passing the phase boundary, which leads to the formation of misfit dislocations at the interface between film and substrate. The concomitant slip lines were observed on the surface of a Gd (0001) film using Scanning Tunneling Microscopy. An additional surface pattern that can be correlated with emitted dislocation loops was observed.