The most recent episode of “The Newsroom” opened with a let’s-put-on-a-show moment — literally — as the idealistic producer of the fictional cable-news program at the heart of the series rallied her troops. Hoping to exploit the chaos of a power blackout to regain control of the newscast, she delivered a stem winder, beginning with, “A miracle happens — we become a team again,” and as it built you couldn’t help thinking: Here he goes again.


Through nine weeks of “The Newsroom,” which finishes its first season Sunday on HBO, Aaron Sorkin, the series’s creator, hasn’t been entirely successful at integrating the two sides of his personality — the civics teacher and the romantic comedian — and the opening of Episode 9 felt particularly strained. It was a Sorkin sermon in the wrong place, before we’d had a chance to settle into our seats.


But then something unexpected happened, for us and for the producer, MacKenzie McHale, known as Mac: The lights came back on. Her hopes of an Edward R. Murrow moment dashed, she screamed and thrashed, and her outsize anger was cathartically funny, undercutting the passion and naïveté just before we went into full cringe.


There was something else going on in the scene too. As the crew trudged back to business as usual, the show’s anchor, Will McAvoy — whose conflicted love for Mac is the real subject of “The Newsroom” — gave her a hard, appraising look. Speeches in Mr. Sorkin’s shows are never there just for their own sake; they’re the building blocks of characters and relationships, and Mac’s outburst had said something to Will. Was he finally ready to forgive her for cheating on him in the past? (Maybe we’ll find out on Sunday.)


That kind of high-wire act — literate, complicated, moving, funny and, in this case, wonderfully acted by Emily Mortimer as Mac — hasn’t been as frequent or as frequently successful in “The Newsroom” as in Mr. Sorkin’s best work. But as Season 1 draws to a close (with a second season already commissioned by HBO), it’s worth saying that it hasn’t been absent either, given the unusually harsh reviews that greeted the show’s premiere in June.


Six years after the end of “The West Wing” Mr. Sorkin had a lot on his mind: the Tea Party, the National Rifle Association, Nancy Grace, anonymous Web comments, the rush to be first with news, the vapidity of the “Real Housewives” shows. And he has blasted away at those subjects and many more, delivering a cri de coeur at the uncivil state of America in the digital age.


That has led to charges (more vehement than had been leveled at him in the past) of elitism, self-righteousness, windbaggery and bias. But in the show’s setting — the world of prime-time cable news, one of the most viciously politicized and highly pressured arenas imaginable — and in the style of high comedy that Mr. Sorkin practices, the broadsides and rants and speeches that he puts into his characters’ mouths make sense, whether you agree with them or not. In part it’s a show about taking sides.


The more pertinent issues have to do with proportion and execution, and there have been reasons for complaint. Some episodes indulged speechifying to the near exclusion of drama, including the third and fourth (which were part of the package sent to critics), and an episode built around the news of Osama bin Laden’s death slid into a surprisingly maudlin and jingoistic finish.


But there’s also been vintage Sorkin, more than enough to justify sticking with the show and to make it one of the stronger entries of the rapidly concluding summer. The scenes between Jeff Daniels as Will and Sam Waterston as the cable network’s unbelievably supportive news director, Charlie Skinner, range from charming to hilarious; Mr. Sorkin, whose repartee is still sharp, gives them the best lines. (An exchange initiated by Charlie — “I was in a bar in Danang.” “Just now?” “1969!” — with its Vietnam-era flavor evokes Mr. Waterston’s role in “The Killing Fields.”)


And Mr. Daniels and Ms. Mortimer are fully equipped to play the thorny, torturous, old-Hollywood-style relationship between Will and Mac, one that Mr. Sorkin has explicitly associated with the great screwball newspaper comedy “His Girl Friday” (with the genders more or less reversed). Simultaneously negotiating a balance of power in their jobs and a personal history of attraction and betrayal, all the while talking nonstop, the characters require an ability to convey two or three conflicting emotions at once, with subtlety and humor and split-second timing.


It’s the sort of thing the entire cast of “The West Wing” seemed effortlessly capable of, but not everyone in “The Newsroom” has been at the same level. John Gallagher Jr., as Mac’s top lieutenant, can hold his own, but Alison Pill and Olivia Munn, as a junior producer and a financial reporter, aren’t summoning the style Mr. Sorkin’s writing calls for, and their scenes can feel flat.


That style is one component of the highly wrought, sometimes dangerously extended fantasy world that Mr. Sorkin creates, and if you’re not willing to buy it, the unlikeliness of events — a newscast showing a montage of crimes committed by Christians, say, or an anchor seriously suggesting toughening the format of presidential campaign debates — may stop you cold.


But if you squint a little and accept that “The Newsroom” isn’t really about the news but, like all of Mr. Sorkin’s series, about competence, honor, loyalty, love and the spirit of a small group of people putting on a show — where it’s less important to be the smartest person in the room than to be the person who puts on the best performance — you should enjoy yourself. There’s still time to catch up on the season at HBO on Demand or HBO Go before Sunday night.