Let $(M,g)$ be a compact connected smooth Riemannian manifold without boundary, and let $(N,h)$ be a smooth Riemannian manifold. Assume that $\operatorname{Ric}^M_p:T_pM\times T_pM\to\mathbb{R}$ is nonnegative definite for every $p\in M$, and that there exists a point $p_0\in M$ such that $\operatorname{Ric}^M_{p_0}$ is positive definite. Assume also that the sectional curvature of $(N,h)$ satisfies $K_N\leq 0$.