Art and commerce can make strange bedfellows in the world of nonprofit theater, especially in hard times.

Olney Theatre Center’s Jim Petosa knows that for sure. He has led the upper-Montgomery County landmark since 1994 and directed shows there well before that. Until the theater’s financial travails of the past three years, he was able to diversify programming in fairly remarkable ways for a suburban venue that began life as a summer theater in 1938.

On Petosa’s watch, the sprawling 14-acre campus off Route 108 has built a new mainstage, an intimate theater lab, and an outdoor amphitheater for summer Shakespeare by Olney’s touring company of young professionals, the National Players. He took Olney Theater Center from a part-time theater to one that operates 10 months a year.

As Olney’s artistic leader, Petosa, 57, has conftonted both financial and artistic struggles. In 2010, the theater faced a $6 million debt and a 5 percent drop in subscriptions. Olney reduced its programming — six shows per year instead of eight — and added more family-friendly shows instead of the more cutting edge theater Petosa favored. The strategy seems to be working, but for Petosa, the artistic challenges lie elsewhere. He will step down as artistic director at the end of this year.

“I’m at a stage in my own career where I really want to focus on projects that I, from a personal artistic point of view, really believe in . . . and I think sometimes personal artistic ­ambitions and institutional ­artistic ambitions don’t necessarily meet,” he says.

Olney’s 2010 roster ended with a well-reviewed revival of “Annie.” Its 2011 season opened with “Andrew Lloyd Webber’s “Joseph and the Amazing Technicolor Dreamcoat” and included a revival of “Grease” and the Agatha Christie mystery “Witness for the Prosecution,” and it is ending with “The Sound of Music,” which has just been extended a third time, through Jan. 22.

In between “Joseph” and “Grease,” Petosa squeezed in more intellectually prickly productions of Beau Willimon’s political drama “Farragut North” — the play recently adapted by George Clooney into the film “The Ides of March” — and Michael Hollinger’s “Opus,” about contentious players in a string quartet. But the overall tone of season 2011 at Olney has been demonstrably tried, true — and commercial.

“I found myself in a financial situation [such that] I could not support artistic choices that conveyed financial risk . . . after the economic downturn of 2008,” says Petosa.

The plan seems to be working. The theater met its ticket sales goal for 2011 by the end of October, before “The Sound of Music” even opened, and will post a profit at year’s end, according to Olney Board President Jennifer Kneeland. The theater has begun to pay down its debt, incurred as a result of a capital expansion project completed in 2005 that was hit by a loss of funding and cost overruns.

The family-friendly programming is not viewed by the theater’s board or its audiences as an “unconscionable compromise,” says Petosa. Indeed, they “seem to be responding to these programming ideas with enthusiasm and passion.”

Joy Zinoman, a longtime colleague and friend, says Petosa is “a beloved figure as a director — high energy, very warm, very positive; filled with ideas.”

But Zinoman, who stepped down in 2010 after 35 years as founding artistic director at Studio Theatre in Washington, questions the road that Petosa and Olney have taken. “Jim is not a person who just wants to do commercial work. In his heart, I don’t think he’s that at all. I would myself not agree that the way to attract an audience is to do that kind of work.”

Even in a bad economy in the far suburbs?

“Even so,” she says. “I believe that it is possible to lead an audience. You’ve got a lot of smart people in Maryland, and you’ve got a lot of people who want variety, and the setting [at Olney’s campus] is lovely . . . they certainly transformed that place from being just a summer theater. And to what end? Not to keep that as its image . . . I don’t believe that that’s the only way.”

“You have to lead an audience and just doing ‘The Sound of Music’ again, or ‘The Christmas Carol’ again, I’m not sure that’s the way to build a theater. I mean, it might solve your problem in the moment, but it’s not going to get you anywhere,” she says.

But as the artistic director of a theater far from an urban center, Petosa says, “I do not have some of the tools that downtown urban theater has, being where we are. We have certain opportunities, but certain challenges that are unique to a more remote geography.”

Petosa will continue to work in theater. For the past 10 years, he has been director of the School of Theatre at Boston University’s College of Fine Arts. He has also staged much professional theater in that city. In recent years, he has run Olney mostly via phone or commuting on the MetroLiner. In Boston, he’s been able to take the kinds of artistic chances that he cannot take at Olney these days.

And though he won’t say outright that he’s downhearted about Olney’s change of course, Petosa says, “I really pine for the day that Olney can return to a more aggressive artistic presence in its seasons, because that is clearly the standard of my own legacy, that I hope will reappear in Olney’s future.”

Horwitz is a freelance writer.