LOS ANGELES — John Gavin, the tall, strikingly handsome actor who appeared in “Spartacus,” “Psycho” and other hit films of the 1960s before forsaking acting to become President Reagan’s ambassador to Mexico, has died at age 86.

Gavin, who was also a former president of the Screen Actors Guild, died Friday, said Brad Burton Moss, manager of Gavin’s wife, actress Constance Towers.

After appearances in a handful of 1950s B-movies, Gavin’s breakthrough came in 1958 when he landed the lead role of a World War II German soldier in “A Time to Love and a Time to Die.”

The film was based on an Erich Maria Remarque novel, and Universal Studios, having won an Academy Award in 1930 with its adaptation of Remarque’s “All Quiet on the Western Front,” was hoping lightning would strike again.

With a postwar audience hungering for escapism, however, it didn’t happen and neither the film nor its leading man fared well with critics.

Universal didn’t lose faith, however, starring him opposite Lana Turner in a remake of the soap opera “Imitation of Life” the next year. Then came the role of Janet Leigh’s divorced lover, Sam Loomis, in the 1960 Alfred Hitchcock classic “Psycho.”

Gavin’s performance, though, was overshadowed by those of Leigh as the tentative, frightened thief who steals $40,000 to keep their romance together, and by Anthony Perkins as the psychotic owner of the Bates Motel, where she seeks shelter on her way to meet her lover.

Gavin went on to make a flurry of films over the next two years, playing Julius Caesar in “Spartacus,” appearing opposite Susan Hayward in “Back Street,” opposite Sandra Dee in Peter Ustinov’s Shakespearian spoof “Romanoff and Juliet” and again with Dee in “Tammy Tell Me True.”

His career began to wane by the end of the 1960s and a minor role in the 1967 musical “Thoroughly Modern Millie,” starring Julie Andrews, marked the end of his association with Universal.

He made a few other films and appeared on TV shows such as “Fantasy Island,” “The Love Boat” and “Hart to Hart,” but he was already on the road to another profession, diplomacy.

Unlike some who win ambassadorships as political favors and are sent to countries they know little about, Gavin arrived in Mexico in 1981 well equipped for the job.

His father had invested in the country’s mines, and ancestors of his Mexican-born mother were among California’s first Spanish settlers.