LOS ANGELES — Actor Roger Smith, who brought glamour to the TV detective genre as a hip private eye on "77 Sunset Strip," has died. He was 84.

Jack Gilardi, who is the agent of Smith's widow, actress Ann-Margret, said the actor died Sunday morning at a Los Angeles hospital after battling a terminal illness. Smith had battled the nerve disease myasthenia gravis for many years.

The actor launched his career in the 1950s when James Cagney spotted him and recommended him for films. He survived two serious illnesses to have a second career after "77 Sunset Strip" as manager of Ann-Margret, who was his second wife.

Actor Roger Smith and wife Ann-Margret attend the world premiere of "Going in Style" in New York on March 30. Roger Smith died Sunday at age 84. Evan Agostini / Evan Agostini/Invision/AP

From 1958 to 1963, he co-starred with Efrem Zimbalist Jr. on the glossy ABC series. It made stars of both men and a teen heartthrob out of Edd Byrnes, who played a colorful parking lot attendant named Kookie.

"77 Sunset Strip" had been created by producer-writer Roy Huggins, who also created "Maverick," and it spawned a host of spinoffs and knockoffs, including "Hawaiian Eye," ''Surfside 6" and "Bourbon Street Beat."

Smith told the Los Angeles Times that the series aimed to show that private investigators were well-trained, serious men, and not the movie and TV stereotype with "dangling cigarettes and large chips on their shoulders." He was chosen for the part because "I don't look like a detective."

But the show had its glamorous side, too. In its Encyclopedia of Television, the Museum of Broadcast Communications said the show revived the crime drama and became "the epicenter of hipness on television, a sun-drenched world of cocktails, cool jazz and convertibles."

Then Smith was hospitalized after falling down at home and losing consciousness. He was diagnosed two days later with a blood clot on the brain. In a March 1960 story on the incident, Look magazine blamed medical mistakes for the delay in diagnosis and quoted a doctor as saying, "This boy came too close to being buried — needlessly."

He rejoined "77 Sunset Strip" after recovering and continued in his role as Jeff Spencer until 1963 when the entire cast except Zimbalist was dropped in attempt to revitalize it. The show lingered for only one more year.

Meanwhile, Smith got the title role in the NBC series based on "Mister Roberts," based on the 1955 comedy-drama about Navy life. It lasted from 1965-66.

When he first gained fame, he had been married to a glamorous Australian actress, Victoria Shaw, with whom he had three children. They divorced in 1965.

Meanwhile he was dating Ann-Margret, the dynamic singer, dancer and actress of "Bye Bye Birdie," ''Viva Las Vegas" and other films. They were married quietly in Las Vegas in 1967. Smith later quit to manage her career.

Actors Roger Smith, from left, Carolyn Komant and Efrem Zimbalist Jr., tune up for their parts in the TV series "77 Sunset Strip," in February 1961. Harold Filan / AP

"Now in Roger I've found all the men I need rolled into one — a father, a friend, a lover, a manager, a businessman," she told writer Rex Reed in 1972. "It's perfect for me. I couldn't exist without a strong man."

For decades Smith guided Ann-Margret's career with great care. She broke her sex kitten stereotype in dramatic fashion in 1971 when she appeared in Mike Nichols' "Carnal Knowledge" as the abused mistress of Jack Nicholson. Critics praised her performance and she was nominated for an Oscar for supporting actress.

She was nominated again in 1975 for her portrayal of Roger Daltrey's mother in the film version of the Who's rock opera "Tommy."

While appearing at the Sahara Hotel at Lake Tahoe in 1972, she fell 22 feet from a scaffold and suffered severe injuries.

"She could quit working tomorrow and we'd have enough money to live on for the rest of our lives," Smith told Reed in late 1972 as she recovered from her injuries. "But when the time comes, she gets interested in another act or a new film or something that delays it. The fact is, the girl just loves to work."

In 1965, Smith was diagnosed with myasthenia gravis, a disorder that disrupts the transmission of nerve signals to the muscles, causing severe muscle weakness. Despite the disease, Smith continued working when he was able as the effects of the disease varied over time.

"I have this great dream that when Ann-Margret gets out of movies, she and I will co-star in a Broadway play," he told New York magazine in 1976. "But right now I still think it's impossible to be married to a successful actress and have your own career and have the marriage work."

Smith was born in 1932, in South Gate, near Los Angeles. When he was 6, his parents enrolled him in a professional school in Hollywood where he learned singing and dancing. When he was 12 the family moved to Nogales, Ariz., where he excelled in the high school acting club and football team.

He served 2½ years in the Navy Reserve, and in Hawaii he sang at social events. Cagney, who was there making a film, suggested that Smith might try for a film career. When Smith's Navy service ended, he signed a contract with Columbia Pictures.

Cagney recommended Smith for a role in "Man of a Thousand Faces," the 1957 film biography of silent star Lon Chaney. Cagney was Chaney, while Smith played Chaney's son as a young man. Smith then was cast in "Auntie Mame," playing star Rosalind Russell's nephew, Patrick, as a young man.

He and Ann-Margret had no children; in the 1980s, she told interviewers she had tried in vain to get pregnant for over a decade.