Patriotism and self-interest clash powerfully in “The Age of Shadows,” a stylish and morally complex thriller set largely in Japanese-occupied 1920s Seoul. The man at the center of the action exemplifies the national quandary: Lee (the great Song Kang-ho) is a Korean officer of the Japanese police, but he has ties to and sympathies for the resistance.

After a rebel leader is trapped in the dynamic opening sequence, Lee meets another dissident, the charismatic Kim (Gong Yoo). The two become cautiously friendly, and when Kim heads to Shanghai to buy explosives, Lee offers assistance. On the train ride home, a deftly staged shootout forces Lee to choose between Kim and the Japanese. Yet Lee appears to keep playing both sides until the concluding act of insurrection.

The movie’s director, Kim Jee-woon, detoured to Hollywood for 2013’s “The Last Stand,” a middling Arnold Schwarzenegger vehicle. But he’s probably best known for “I Saw the Devil,” a memorably grisly serial-killer flick. “The Age of Shadows” emphasizes intrigue and melancholy over violence, yet includes a few harrowing torture scenes and one macho moment with a severed toe. (Anyone who remembers the detached heads in “Devil” will know they’ll see that toe again.)

“The Age of Shadows” is fiction based on actual people and events, so some knowledge of the period is helpful, but not required. The movie’s visual panache and fog-of-war ambiguity are as universal as the desire to detonate TNT under your enemy’s headquarters.

Unrated. At Regal Fairfax Towne Center 10 and Cinemark Egyptian 24 and XD. Contains violence, including torture. In Korean, Japanese, Chinese and English with subtitles. 140 minutes.