JOHN WAYNE had a three-year affair with German bombshell MARLENE DIETRICH that ended up ruining his marriage and getting him investigated by the FBI.

In the biography “John Wayne: The Life and Legend”, author Scott Eyman says the stars met in 1939 after Dietrich spotted him in a restaurant, “looked him up and down as though he were a prime rib,” and told Hollywood director Tay Garnett, “Daddy, buy me that!”

Garnett said you’d be blind if you couldn’t see what would happen because “their relationship got off like a fireworks display.”

The statuesque German was Hollywood’s reigning sex siren. She and Wayne made the 1940 movie “Seven Sinners", the first of three together.

At the time, 32-year-old Wayne was wed to first wife Josephine Saenz. Dietrich was married to Rudolf Sieber.

However, the stars made no attempt to hide their affair even when the FBI came sniffing around to see if Marlene was a Nazi sympathizer during World War II.

Agents were shocked to learn she was sleeping with Wayne – and others, including French actor Jean Gabin, “All Quiet on the Western Front” author Erich Maria Remarque and actress Kay Francis.

But she made it plain she HATED the Nazis and the Duke was her main squeeze.

When Wayne would arrive on set, she’d leap into his arms and wrap her legs around him, the book adds. The macho star also didn’t care that his mistress spent a lot of time with a close lesbian friend, writes Eyman.

The “True Grit” legend once told a pal that one night he spent with Dietrich in Rome’s Excelsior Hotel was the best sexual experience of his life.

Still, the long fling cost Wayne his troubled marriage: “Dietrich was very near the last straw,” says Eyman.

The actor told his wife he’d end the fling – if she’d stop talking about the German actress.

But Josephine kept harping on her rival.

The author quotes Wayne as admitting, “That’s when I knew the marriage was over.”