Yuri Lyubimov, a Russian stage director whose adventurous productions won a devoted following, frequently landed him in trouble with Soviet authorities and eventually led to his exile — but who later returned in triumph and remained a mainstay of Russian theater for more than 20 years — died on Sunday in Moscow. He was 97.

His wife, Katalin, confirmed his death to the news agency Tass.

The Taganka Theater in Moscow, which Mr. Lyubimov founded in 1964, was known for breaking rules. Its flashy, fast-moving productions included song, dance, poetry and provocation. Actors spoke directly to the audience, sometimes even when the script didn’t call for it. The singer, songwriter and actor Vladimir Vysotsky, who joined the theater shortly after it was established, shocked traditionalists by strumming a guitar while playing Hamlet. The great American playwright Arthur Miller said the Taganka restored his faith in theater.

Mr. Lyubimov staged adaptations of John Reed’s “10 Days That Shook the World” about the Bolshevik Revolution and dozens of works of literature that did not obviously lend themselves to a theatrical treatment. He also staged plays that were implicitly, and sometimes not so implicitly, critical of the Soviet system.

In a country where the arts were closely scrutinized and often censored by the government, Mr. Lyubimov walked a fine line and sometimes crossed it. Some of his productions were banned outright; others had to be rewritten to remove what the authorities considered subversive content; others were merely criticized from on high.

In 1977, for example, the Ministry of Culture approved his adaptation of “The Master and Margarita,” an underground novel by the Russian author Mikhail Bulgakov that draws parallels between the crucifixion of Jesus and the persecution of a Soviet writer — but once the production was a success, the Communist Party newspaper Pravda attacked it for its “distortion of historical perspective,” faulting it for, among other things, not making clear that the story was set in Stalin’s time and not the present. (“The Master and Margarita” nonetheless remained a staple of the theater’s repertory.)

Audiences flocked to the Taganka, which came to be seen as the epicenter of experimental theater in Russia. The theater became more popular after Mr. Vysotsky, whose politically charged ballads had earned him a devoted following, joined the troupe. Shielded from harsher action in part by that popularity and in part by the fact that some high-ranking Communist officials admired his work, Mr. Lyubimov tried to take government interference with a shrug.

“The theater, after all, is not mine,” he said in a 1976 interview with The New York Times. “The theater belongs to the state.”

The state finally lost patience with Mr. Lyubimov in 1984, after he went to London to stage a version of “Crime and Punishment” and openly criticized the Soviet leadership in newspaper interviews. He was stripped of his citizenship, his apartment was seized and he was removed from his post at the Taganka.

“They sent me to England, like the king sent Hamlet to England, to be rid of me,” Mr. Lyubimov told The New York Times Magazine in 1986. “Once you’re out of Russia you don’t exist. Your name is wiped out. It never appears again anywhere.”

That ultimately proved not to be the case for Mr. Lyubimov, but he did spend five years in exile, navigating the globe as a theater and opera director, to much acclaim.

He worked at La Scala in Milan, the Staatsoper in Munich, the Royal Opera House in London and elsewhere in Europe, and at the Habima Theater in Tel Aviv. He made his American debut with “Crime and Punishment” at Arena Stage in Washington in and staged a production of “Lulu” at the Chicago Lyric Opera in 1987.

Those years were not without conflict. In 1987 he clashed with executives of the American Repertory Theater in Cambridge, Mass., over his concept for “The Master and Margarita,” and the play was never staged. A year later the Royal Opera House dismissed him as director of Wagner’s “Ring” cycle, citing a “difference in artistic interpretation” between Mr. Lyubimov and the musical director Bernard Haitink.

In 1988, in the era of glasnost preceding the end of the Soviet Union, Mr. Lyubimov was invited back to Moscow to help stage a production of “Boris Godunov.” The next year he was officially welcomed home, given his citizenship back and restored to his post at the Taganka.

He remained there until he abruptly resigned during a tour of the Czech Republic in 2011, complaining that his actors cared more about money than art when they refused to participate in a rehearsal until they were paid. But he continued to direct elsewhere, and his adaptation of the Dostoyevsky novel “The Possessed” was presented as part of a celebration of his 95th birthday.

Born on Sept. 30, 1917, just weeks before the Russian Revolution, in Yaroslavl, along the Volga River between Moscow and St. Petersburg, Yuri Petrovich Lyubimov grew up loving the arts thanks to his mother, a music teacher. His parents, intellectuals descended from peasants, were imprisoned briefly during Stalin’s reign. He fell in love with theater as a teenager and studied acting and directing before being drafted into the Soviet Army in 1941. He performed on the front lines with a music and acting ensemble that included Dmitri Shostakovich.

After the war he joined the Vakhtangov Theater in Moscow as an actor. He made his directing debut in 1959 and four years later first drew the attention of both the public and the authorities with a production of Bertolt Brecht’s “The Good Person of Szechwan,” about a prostitute protected by the gods, which established Mr. Lyubimov as a leader of the Russian avant-garde theater and a hero of the Soviet intelligentsia.

Besides his wife, survivors include a son, Peter, and several grandchildren.

Mr. Lyubimov rarely worked outside Russia after his return, although his troupe continued to tour the world without him. His later productions included a stage version of “Dr. Zhivago” and an adaptation of “Sharashka,” an autobiographical play by Aleksandr Solzhenitsyn, in which Mr. Lyubimov played Stalin. In 2002 the Taganka celebrated Mr. Lyubimov’s 85th birthday on the opening night of his new adaptation of Goethe’s “Faust.” It was the 11th production he had directed since turning 80.

“I give the maximum of myself, and I try to do whatever I can,” Mr. Lyubimov told The Times in 1986. “I cannot say more than what Gogol said: ‘Do your job as if it were an order from God.’ ”