The margin may be slim, but a hot streak since February puts 'The Late Show' at No. 1 over 'Tonight' for the year with 22,000 more viewers.

All of that heat for Stephen Colbert came at just the right time. In the last full week of the 2016-17 broadcast season, CBS' The Late Show With Stephen Colbert managed to top NBC's The Tonight Show Starring Jimmy Fallon as the most-watched late-night talk show on broadcast.

An obvious first for Colbert, who struggled in his first year on The Late Show, it's a first for CBS since 1995. That's the last time its late-night entry bested a full season of The Tonight Show. (Of course, that's excluding the weird 2009-10 debacle when Conan O'Brien briefly took on the role of Tonight host, to middling results, and Jay Leno returned halfway through the year.)

The actual breakdown does show a narrow margin. The Late Show leads The Tonight Show by 22,000 viewers, 3.195 million compared to 3.173 million, but the year-to-year changes offer the most telling information. Late Show has improved 11 percent, while Tonight has fallen 15 percent. Additional DVR data could improve Colbert's margin of victory, as he tends to add a great deal many more time-shifted viewers than Fallon. (ABC's Jimmy Kimmel Live! is the most steady, averaging 2.2 million for his season.)

It's a pretty stunning turn of events for Colbert, whose negative ratings narrative prompted a come-to-Jesus meeting with CBS brass in early 2016. The momentum has clearly been his since the inauguration of President Donald Trump. Colbert's relentless coverage of the new administration and its many public foibles has made him one of the biggest beneficiaries of all of the political interest on TV right now.

The Late Show win comes with a caveat, and a big one at that: The Tonight Show remains the uncontested leader in the advertiser-favored demographic of adults 18-49. Fallon won his latest season in the group with an average .81 rating, outperforming Colbert's .58 rating by nearly 40 percent.