The authors are concerned with the existence of a positive solution $u\in H^1(\Bbb R^N)$ of the non-autonomous Schrödinger equation $-\Delta u+V(x)u=f(u)$ in $\Bbb R^N$, $N\geq2$, where $f: [0,+\infty)\rightarrow\Bbb R$ and $V: \Bbb R^N\rightarrow\Bbb R$ are continuous functions. The main feature of this paper is that the authors replace the standard global Ambrosetti-Rabinowitz superlinear condition $0<\mu\int_0^tf(s)\,ds\leq tf(t)\,dt$, for all $t\in\Bbb R$ and some $\mu>2$, with a less restrictive assumption on $f$, which does not need global conditions on the nonlinearity. More precisely, the nonlinear term $f$ is supposed to have a superlinear and subcritical growth at infinity, while around the origin $f$ satisfies $f(0)=0$ and $f'(0)$ is defined. Under some standard assumptions on the variable potential $V$, the authors establish the existence of at least one nontrivial positive solution. The proof of this result relies on appropriate variational methods, in which the “problem at infinity” plays an important role. This approach is crucial to ensure the compactness of bounded Palais-Smale sequences. The method developed in the present paper can be generalized for solving other classes of nonlinear stationary differential equations lacking compactness.