I've been doing some old exam problems and I've come across a problem that I've answered, but my gut is telling me that there's something I'm glossing over.
Let $R$ be a commutative ring with identity and let $U$ be an ideal that is maximal among non-finitely generated ideals of $R$. I wish to show that $U$ is a prime ideal.
Assume that $U$ is not prime. Let $x, y\not\in U$ be such that $xy\in U$. $U$ is contained in a maximal ideal $M$ and $xy\in M$, so either $x$ or $y$ is in $M$; assume $x\in M$. The condition $U\subset M$ then implies that there is a ring homomorphism $$\varphi: R/M\to R/U$$
Since $R/M$ is a field, $\varphi$ is injective. Hence, $\varphi(x)\in U$. This is a contradiction, so $U$ must be prime.
The thing that worries me is that I never explicitly used the hypothesis that $U$ was not finitely generated or the result that $M$ must be finitely generated.