In this paper, we derive a version of the Pontryagin maximum principle for general finite-dimensional nonlinear optimal sampled-data control problems. Our framework is actually much more general, and we treat optimal control problems for which the state variable evolves on a given time scale (arbitrary non-empty closed subset of R), and the control variable evolves on a smaller time scale. Sampled-data systems are then a particular case. Our proof is based on the construction of appropriate needle-like variations and on the Ekeland variational principle.2010 Mathematics Subject Classification. 49J15, 93C57, 34N99, 39A12. 53 54 LOÏC BOURDIN AND EMMANUEL TRÉLAT R m ≤ 0,for every y ∈ Ω. In the case where kT ∈ [0, t * f ) with (k + 1)T > t * f , the above maximization condition is still valid provided (k + 1)T is replaced with t * f .