The Spanish Prisoner is a quirky drama/suspense/thriller written and directed by David Mamet. When I saw it as a new film back in 1998, I thought it was the most clever movie I had ever seen. And I would still recommend it. Especially if you like Campbell Scott and a very slick Steve Martin. Also featured are Rebecca Pidgeon and Felicity Huffman. You can watch the original trailer here.
At the very end I think I was still not sure what exactly had happened, and it took a number of days to really figure it all out. A very intricate cinematic experience, indeed.
It also has one of my favorite movies quotes, "Worry is like interest paid in advance on a debt that never comes due." I remember repeating that phrase to myself over and over. Hmmm...'98 must have been a rough year.