August was not the hottest month for Stephen Colbert. Ratings for CBS’ “The Late Show” — which had been on a steady slide since shortly after Colbert’s debut as host in 2015 — hit a new low, with the monthly total-viewer average slipping below 2 million for the first time. If its trajectory continued, Colbert’s “Late Show,” already far behind Jimmy Fallon and NBC’s “The Tonight Show,” was in danger of falling into third place in the ratings wars below ABC’s “Jimmy Kimmel Live.” Fallon appeared primed for a long reign as king of late night.

Six months later, Colbert has the industry watching the throne.

The former host of Comedy Central’s “The Colbert Report” is on a streak that just recently seemed unthinkable — three straight weeks of topping Fallon. After airing reruns the week of Jan. 23, “The Late Show” returned Jan. 30 and averaged slightly more than 2.77 million total viewers for the week, edging out Fallon’s not-quite 2.76 million. The next week, Colbert averaged more than 3 million, and Fallon less than 2.88 million. For the week of Feb. 13, “Late Show” topped “Tonight” again, 3.00 million to 2.71 million.

The shift comes at the convergence of two long ratings arcs — Colbert’s upward, Fallon’s downward. In January, “The Late Show” averaged nearly 2.54 million viewers, up 30% since August. Fallon is down 5% over the same period. Over a lengthier period, Fallon’s viewer loss is more severe. Versus January 2016, “The Tonight Show” is down 14%. “The Late Show” is up 3%.

So what has happened in the past year that could have set the stage for a fundamental change in the late-night television landscape? There is one thing.

“Fallon has had a lack of pointed humor,” says Katz Television Group’s Bill Carroll, “whereas Colbert has gone full to the wall on Trump.”

CBS insiders acknowledge that the network botched Colbert’s “Late Show” launch in 2015. Creatively, they felt the show began to right itself last summer but worried that viewers who had sampled and rejected the show wouldn’t give it a second chance.

An opening came in the form of Donald Trump. Network insiders believe that the inauguration and the early days of the Trump presidency, which have fueled cable-news ratings long after they were expected to slide into a post-election slump, also inspired viewers curious about what Colbert — who came to prominence as a hard-punching political satirist on Comedy Central — was up to. (CBS announced that the Feb. 28 “Late Show” would be broadcast live so that Colbert could riff on Trump’s address to Congress.)

What those viewers found was a show whose structure had been adjusted to balance its host’s strengths with the limitations of a broadcast talker: a hard focus on politics and news in the monologue and minutes following, a balance of satire and less topical comedy in the second segment, then a full pivot to the banter-heavy celebrity interviews that are late night’s universal currency.

The results have been such that CBS CEO Leslie Moonves crowed about Colbert’s “great story” on an earnings call last week. “Late-night is clearly a reenergized and exciting daypart for us right now, delivering 10% growth in advertising in 2016 and continued growth here in 2017,” Moonves claimed.

Fallon, meanwhile, has appeared at times to misread the moment. A September interview in which he asked (and was granted) permission to muss Trump’s hair triggered a vitriolic social-media response. When a TMZ reporter asked Fallon three days later about complaints that he had softballed Trump, the host responded, “Have you seen my show? I’m never too hard on anyone.”

The “Tonight” host has poked fun at Trump at times, such as when he opened the Feb. 16 show with an impression of the president at his impromptu White House press conference that morning. But Fallon tends toward a lighter touch than Colbert when dealing with Trump, and with politics and social issues in general. That approach may not be best suited to a news cycle dominated by the Trump administration’s scandals and assaults on the media.

“The perceived momentum is in the Colbert column,” Carroll says. “The key is going to be what happens to both Fallon and Colbert demographically. Total audience is one thing; demographics is another.”

Right now, the “Late Show” resurgence is a very CBS resurgence. By far the oldest-skewing broadcast network, CBS focuses its primetime strategy on total viewers and the 25-54 demo more than the other networks do. But in late night, where advertisers hunt for younger viewers, 18-49 is the key demo.

Colbert has narrowed the gap in the 18-49 demo in recent weeks, but largely via Fallon’s losses, not due to any significant gains of his own. Colbert is hampered in attracting younger viewers by a CBS primetime schedule dominated in the 10 p.m. hour by procedurals designed to draw older eyeballs.

But the task isn’t impossible. Carroll points out that Jay Leno’s “Tonight Show” spent several years topping late-night while NBC was stuck in fourth place in primetime. If Colbert can pull off a similar feat and put Fallon’s demo lead in danger, Carroll says, “That’s when the memos will start flying around.”