Actors James Stewart, left, and Hugh O’Brian confer in 1963 on the set of “Cheyenne Autumn” in Los Angeles. (DAB/AP)

Hugh O’Brian, a square-jawed, ruggedly handsome actor who starred as Marshal Wyatt Earp in the popular 1950s TV series and founded a philanthropic organization that encourages youth leadership, died Sept. 5 at his home in Beverly Hills, Calif. He was 91.

A representative from HOBY, founded in the late 1950s as Hugh O’Brian Youth Leadership, confirmed the death but did not cite a cause.

A strapping former Marine Corps drill instructor, Mr. O’Brian had originally planned to study law, but his appearance in a play in Los Angeles drew the attention of movie star Ida Lupino. She cast him in a featured role in “Never Fear,” a 1949 film she was directing, and his acting career was launched.

Over the next several years, he won small parts in films including “The Return of Jesse James,” “Red Ball Express,” “Broken Lance” and “There’s No Business Like Show Business.”

His breakthrough was “The Life and Legend of Wyatt Earp,” which aired on ABC from 1955 to 1961. Unlike most TV Westerns — “The Lone Ranger,” “Hopalong Cassidy,” the singing cowboys’ series — “Wyatt Earp” was not explicitly aimed at adolescent boys. “The character had a job to do,” Mr. O’Brian later told the Los Angeles Times, “and the people had real psychological needs and frailties.”

Actor Hugh O’Brian as Wyatt Earp on TV. (The Washington Post)

The real Earp, who lived from 1848 to 1929, is most famous for his participation in the 1881 “Shootout at the O.K. Corral” in Tombstone, Ariz. The TV show tried to hew to authenticity, and it won critical plaudits.

“Gunsmoke,” which debuted just a few days after “Wyatt Earp,” became an even bigger hit, and by 1956-57, both were in the top 20 shows. In the 1958-59 season, Westerns accounted for an incredible seven out of the top 10 U.S. television series, including No. 1 “Gunsmoke” and No. 2 “Wagon Train,” with “Wyatt Earp” at No. 10.

“Wyatt Earp” remained a top 20 hit until 1960, but it was canceled the following year after being supplanted by the avalanche of other adult-oriented Westerns.

Mr. O’Brian, meanwhile, continued to work frequently in movies, television and theater through the 1990s, although he never again achieved the prominence he enjoyed as Wyatt Earp.

He starred in the science-fiction series “Search,” which aired on NBC from 1972 to 1973, and in films such as “Come Fly With Me” (1963) with Dolores Hart, “Love Has Many Faces” (1965) with Lana Turner and “Ambush Bay” (1966), a well-received war drama with Mickey Rooney. Mr. O’Brian reprised his role as Earp in 1994’s “Wyatt Earp: Return to Tombstone,” a film that combined new footage with colorized scenes from the original black-and-white TV show.

He also had a small but memorable role as the faro dealer in John Wayne’s last film, “The Shootist” (1976), and noted with pride that it gave him the distinction of being the last bad guy killed by Wayne, who retired soon after.

Hugh Charles Krampe was born in Rochester, N.Y., on April 19, 1925. He excelled in athletics and served in the Marine Corps during World War II. On the GI Bill, he enrolled at Yale Law School in 1947, but he took that summer off and went to Hollywood.

A woman he was dating was acting in a stage version of W. Somerset Maugham’s “Home and Beauty,” and he began hanging out at the theater. When the leading man became ill, Mr. O’Brian began filling in.

“After about four days, they realized the guy wasn’t going to come back,” he later recalled, adding that he was soon named the permanent replacement. “We did the show and a reporter for the L.A. Times came down to see it, and the next day he wrote a tremendous review.”

Less auspiciously, the show’s playbill did not spell his name correctly. “They left the ‘m’ out of Krampe,” he told the Times in 2013. “I decided right then I didn’t want to go through life being known as Huge Krape, so I decided to take my mother’s family name, O’Brien. But they misspelled it as ‘O’Brian,’ and I just decided to stay with that.”

In short order, he was acting in Lupino’s film and signed to a contract at Universal Studios.

He also made his mark in philanthropy. He founded the Hugh O’Brian Youth Leadership organization after a visit to the settlement and hospital run by the doctor-missionary Albert Schweitzer.

Although his journey was derided by some critics as a publicity stunt, the actor dismissed the remarks, telling reporters how his life had been changed by the Nobel Peace Prize recipient.

Shortly after returning home, he founded the youth group. Each year, it brought together promising high school sophomores at sites around the country for leadership seminars. In 1999, Mr. O’Brian estimated that HOBY had more than 200,000 graduates from ages 16 to 59, among them future Arkansas Gov. Mike Huckabee. He received numerous awards for his achievement.

In June 2006, at age 81, Mr. O’Brian wed 54-year-old Virginia Barber at the Forest Lawn Memorial Park cemetery in what they quipped was a “wedding to die for.”

It was his first marriage, but his romances were many and well publicized, especially his fling with Princess Soraya, the ex-wife of the shah of Iran. In 1969, he faced a paternity suit in which he was judged to be the father of the 16-year-old son of a Los Angeles photographer, Adina Etkes. He was ordered to pay $250 monthly support for the boy, whose name was Hugh Krampe Jr.

Survivors also include a brother.