The legendary Marvel Comics figure Stan Lee, 95, who co-created beloved characters like Spider-Man, the X-Men, and Black Panther, died Monday in Los Angeles.

Mr. Lee died at Cedars-Sinai Medical Center after being rushed there from his Hollywood Hills home. The cause of death has not been released, though the writer, editor, and publisher had recently battled pneumonia and suffered from vision problems.

As the top writer at Marvel and later as its publisher, Mr. Lee was widely considered the architect of the contemporary comic book. He revived the industry in the 1960s by offering the costumes and action craved by younger readers while insisting on sophisticated plots, college-level dialogue, satire, science fiction, even philosophy. Mr. Lee first joined the comic company as an assistant in 1939, when it was still known as Timely Publications. In 1941, when Mr. Lee was just 19, he took over as editor-in-chief.

In 1961, Mr. Lee and friend Jack Kirby, a fellow comic book industry legend, rebranded Timely as Marvel Comics, and launched the Fantastic Four, the first group of many famous characters the duo would invent. During his 1960s heyday, Mr. Lee would go on to develop not only Spider-Man but the Incredible Hulk, Iron Man, and many other characters. "It was like there was something in the air. I couldn't do anything wrong," he told the Associated Press in 2006.

Mr. Lee scripted most of Marvel's superhero comics during the '60s, including the Avengers and the X-Men, two of the most enduring. In 1972, he became Marvel's publisher and editorial director; four years later, 72 million copies of the Amazing Spider-Man were sold.

"He's become our Mickey Mouse," he once said of the web-crawling crusader.

The first big-budget movie based on Mr. Lee's characters, X-Men, was a smash in 2000, earning more than $130 million at North American theaters. Spider-Man did even better, taking in more than $400 million in 2002. (Mr. Lee later sued Marvel for $10 million, saying the company cheated him out of millions in profits from movies based on his characters, including Spider-Man.) A Marvel movie empire would emerge after that, one of the most lucrative franchises in cinema history, with the recent Avengers: Infinity War grossing more than $2 billion worldwide. In 10 years, the Marvel Cinematic Universe films have netted over $17.6 billion in worldwide grosses.

Mr. Lee became the public face of Marvel Comics and frequently made small appearances in the Marvel Cinematic Universe projects. Most recently, he briefly appeared in Venom, in which he is credited as the "dapper dog walker."

Despite Marvel movies' recent success, Mr. Lee was not always so gung-ho about the art form. Back in 1983, Mr. Lee said making movies was a little more time-consuming than making comics — and a lot more expensive.

"What's frustrating about films is that they take forever to get off the ground," he said. "Developing them, selling them, casting them, getting a story that everybody likes. I can understand why — with a comic magazine with a new title, you're investing a few thousand dollars. With any sort of motion picture today, you're investing an average between $5 million and $10 million or more. So, obviously, it's not something that you rush into."

Stanley Martin Lieber was born on Dec. 28, 1922, in New York City. He grew up a fan of the Hardy Boys adventure books and Errol Flynn movies, and got the job at Timely Comics after graduating from high school.

His early work largely reflected popular movies — westerns, crime dramas, romance, whatever was the rage. He worked for about 50 cents per page.

After a stint in the Army during World War II, writing for training films, he was back at Marvel to begin a long and admittedly boring run of assembly-line comic book production.

Comics in the 1950s were the subject of Senate hearings pushed by the Comics Code Authority, which frowned on gore and characters who questioned authority. Major comic book companies adopted the code as a form of self-regulation to avoid sanctions.

Mr. Lee said he was also working for a publisher who considered comics as fare only for children.

"One day I said, 'This is insane,'" Mr. Lee told the Guardian in 1979. "I'm just doing the same type of stories as everybody else. I wasn't taking pride in my work, and I wanted to quit. But my wife said, 'Look, why don't you do the kind of comics you want for a change?'"

The result was the first issue of the Fantastic Four in 1960, with the characters, plot and text from Mr. Lee and the illustrations by Kirby.

The characters were normal people changed into reluctant superheroes through no fault of their own. The Amazing Spider-Man followed in 1962 and before long, Marvel was an industry behemoth.

As sales of comics declined, Marvel was forced into bankruptcy proceedings that meant it had to void a lifetime contract prohibiting Mr. Lee from working for anyone else. In 2000, Mr. Lee agreed to write stories for DC Comics, reinventing Superman, Batman, Wonder Woman, and other signature characters for Marvel's one-time rival.

He worked into his 90s on numerous projects, including comics, films and DVDs.

Mr. Lee's wife and partner in nearly everything, Joan, died on July 6, 2017, leaving a void that made her husband, by then in mental and physical decline, vulnerable to hangers-on. Lawsuits, court fights, and an elder abuse investigation all emerged in the battle over who spoke for Mr. Lee.

He is survived by his daughter, Joan Celia, known as "J.C.," and a brother who also works for Marvel.

"We try our best to have fun with what we do," Mr. Lee said in 1986. "If we don't entertain you … it's meaningless."

This article contains information from the Associated Press.