Suppose that ω n , 0 , ω n , 1 , … , ω n , k {\omega _{n,0}},{\omega _{n,1}}, \ldots ,{\omega _{n,k}} are distinct complex numbers with | n − ω n , j | ⩽ δ |n - {\omega _{n,j}}| \leqslant \delta for all n ∈ Z , j = 0 , 1 , … , k n \in {\mathbf {Z}},j = 0,1, \ldots ,k . We show that if δ > 0 \delta > 0 is small enough then, given complex numbers c n , j ( n ∈ Z , j = 0 , 1 , … , k ) {c_{n,j}}(n \in {\mathbf {Z}},j = 0,1, \ldots ,k) there exists f ∈ L 2 ( − ( k + 1 ) π , ( k + 1 ) π ) f \in {L^2}( - (k + 1)\pi ,(k + 1)\pi ) with \[ ∫ − ( k + 1 ) π ( k + 1 ) π f ( t ) e − i t ω n , j d t = c n , j for n ∈ Z , j = 0 , 1 , … , k \int _{ - (k + 1)\pi }^{(k + 1)\pi } {f(t){e^{ - it{\omega _{n,j}}}}} dt = {c_{n,j}}\quad {\text {for}}\;n \in {\mathbf {Z}},j = 0,1, \ldots ,k \] if and only if certain “divided differences” involving the c n , j {c_{n,j}} ’s and the ω n , j {\omega _{n,j}} ’s are square summable. This extends a classical theorem of Paley and Wiener, which is equivalent to the case k = 0 k = 0 above.