This is sort of a forgotten Kevin Costner movie called No Way Out and it has a twist at the end that shocked me
***SPOILER***
A Navy Lt. Commode (Costner), who works for the Naval Intelligence Service is having an affair with a woman who is also having an affair simultaneously with a highly placed government official(Gene Hackman). That official arrived unexpectedly while Costner fled out the back door. Hackman realizes that she (Sean Young) has another lover and becomes enraged and accidently pushed her from the second floor railing and she dies. Hackman has an underling that scours her apartment, removing any hint of their affair/connection and a picture of her with Costner is found in the process.
Hackman decides to frame Costner as a notorious Soviet mole suspected to be in the Pentagon known by the code name "Yuri." Costner knows of the attempted frame for his lover's murderer AND being a Soviet spy.. He appears to be a patriotic officer who saves a fellow sailor from death at great risk to his own life. Costner turns the table on Hackman and then Hackman kills himself when all appears hopeless. The movie seems to be over, but then Costner returns to his apartment and speaks to his friend and landlord.
They speak together in Russian.
Costner IS Yuri and his landlord is his Soviet handler. His mission was to become romantically involved with Young, but actually fell in love with her. His handler wants him to return to the USSR.... The all American boy was a Soviet spy. *MINDBLOWN*.