In expanding the classical Klein-Gordon field in Fourier space to write it in terms of $\phi(\mathbf{p})$ instead of $\phi(\mathbf{x})$, I reached the following result. 
$$\int \mathrm{d}^3p\exp({i\mathbf{p}\cdot\mathbf{x}})\left[\frac{\partial^2}{\partial \mathrm{t}^2}+|\mathbf{p}|^2 + m^2\right]\phi(\mathbf{p},t) =0$$

Now, how is it concluded that
$$\left[\frac{\partial^2}{\partial \mathrm{t}^2}+|\mathbf{p}|^2 + m^2\right]\phi(\mathbf{p},t) =0.$$

I suspect there is a physical rather than mathematical reasoning for this, since, at least apparently, the integrand could have the whole complex plane as its range. (Or is the assumption that $\phi(\mathbf{x})$ is real, and therefore $\phi ^\*(\mathbf{p})=\phi(\mathbf{-p})$, relevant?)