Under Suspicion. What was that ending, again?

Open spoiler warning!!

I recently watched Under Suspicion, starring Morgan Freeman and Gene Hackman.

The film kept building to the end rather nicely - good character development, nice pace to the plot unfolding… Until the actual end came around…

After many hours of interrogation, Gene Hackman’s character finally confessed to killing the 2 girls, immediately following which some cop interrupts to say that they caught the killer in the act, while he was about to kill his victim no. 3. And then the movie ended. What gives?!

Why did Gene Hackman confess to a crime he hadn’t committed?! And what was the point of Monica Belluci’s role - her testimonies helped build the image of Gene Hackman as a paedophile, but as it turned out, that wasn’t the case!