By JIM RUTENBERG

This is how the muzzling starts: not with a boot on your neck, but with the fear of one that runs so deep that you muzzle yourself.

Maybe it’s the story you decide against doing because it’s liable to provoke a press-bullying president to put the power of his office behind his attempt to destroy your reputation by falsely calling your journalism “fake.”

Maybe it’s the line you hold back from your script or your article because it could trigger a federal leak investigation into you and your sources (so, yeah, jail).

Or, maybe it’s the commentary you spike because you’re a publicly supported news channel and you worry it will cost your station its federal financing.

In that last case, your fear would be existential — a matter of your very survival — and your motivation to self-censor could prove overwhelming.

We no longer have to imagine it. We got a real-life example last week in San Antonio, where a PBS station sat atop the slippery slope toward censorship and then promptly started down it.

It’s a single television station in a single state in a very big country. And the right thing ultimately happened. But only after a very wrong thing happened.

The editorial misfire bears retelling because it showed the most likely way that the new administration’s attempts to shut down the free press could succeed, just as it shows how those attempts can be stopped.

The story began with a Jan. 24 speech that Representative Lamar Smith, Republican of Texas, gave on the House floor regarding what he described as the unfair way the national media was covering President Trump. He said for instance that the media ignored highs in consumer confidence, which of course it did not. And he ended with an admonition for his constituents: “Better to get your news directly from the president. In fact, it might be the only way to get the unvarnished truth.”

His remarks caught the notice, and the ire, of a longtime San Antonio-area journalist and commentator, Rick Casey, who hosts a weekly public affairs program “Texas Week” on KLRN. He ends each week’s show with his own commentary, which also runs in The San Antonio Express-News.

Mr. Casey has been able to work for “40 years as a professional smart ass,” he told me, because “I’m not really a bomb thrower — I’ve watched politicians for so many years that I know how to be strong about something without being unfriendly.”

But Mr. Smith’s comments bothered him enough that he wrote up a stemwinder of a closing commentary. “Smith’s proposal is quite innovative for America,” it went. “We’ve never really tried getting all our news from our top elected official. It has been tried elsewhere, however. North Korea comes to mind.”

All set to go, the commentary was mentioned in a Facebook promotion for the show, which in turn caught the eye of Mr. Smith’s office, which called the station to inquire about the segment.

Forty minutes before the show aired, the station’s president and chief executive, Arthur Rojas Emerson, left a message for Mr. Casey saying he was pulling the commentary and replacing it with an older one. Mr. Casey told me he missed the call, but saw what happened with his own eyes.

At a meeting the next Monday, Mr. Casey said, Mr. Emerson expressed concern “that the Corporation for Public Broadcasting was under attack and that this would add to it.” The Corporation for Public Broadcasting provides financing for public stations, including KLRN, and Mr. Trump’s election has heightened fears that its financing will be cut.

It also happens that Mr. Emerson had left journalism for several years to run his own advertising firm and that Mr. Smith had at one point been a client.

Mr. Casey says he asked Mr. Emerson if he’d be willing to come on the program and discuss it all, but Mr. Emerson declined. And that seemed to be that.

But as we’re learning this year, journalism has a safety net in the people who appreciate it, and the people who work in it.

First, when Mr. Casey’s commentary ran as planned in The San Antonio Express-News, astute readers noticed it was different than the previous night’s televised commentary. The story of what happened began traveling around San Antonio journalism circles, making its way to the Express-News columnist Gilbert Garcia, who shared the details last Friday.

Another titan of Texas journalism, Evan Smith, who co-founded The Texas Tribune and regularly appears on Mr. Casey’s program, noticed Mr. Garcia’s column while he was in Washington. “I had a hot coffee in my hand and I came very close to dropping it,” Mr. Smith told me. “Holding people accountable in public life is so fundamentally important that this idea that somehow we’re going to stop doing that because we’re worried about what the government’s going to do to us, I so unbelievably reject that.”

As it happened, Evan Smith was in Washington for a meeting of the PBS national board, on which he sits, and “I certainly got into the board room and talked to people in the system.” He also called Mr. Emerson, and told him “I didn’t see why The Tribune or I should continue to be associated with this show or this station.”

By late last week, Mr. Emerson had agreed to let Mr. Casey’s original segment run this Friday, as long as it included a new “commentary” label that will run with his opinion segments.

When I caught up with Mr. Emerson this week he acknowledged making “a mistake” that should not tarnish a career spent mostly in broadcast news, starting in a $1.25-an-hour job as a cameraman. “I had to make a decision in what was about 20 minutes,” he said.

He acknowledged that “clearly we always worry about funding for public television,” but said that wasn’t the “principal reason” for his decision to hold back the commentary. “We have to protect the neutrality of the station — somebody could have looked at it as slander,” he said. The “commentary” label, he said, would take care of it.

Mr. Casey is satisfied with the result. But he acknowledged that it was a close call and that he was uniquely qualified to push back in a way others might not be. “I’m lucky to be in the position of being 70 years old, and not in the position of being 45,” he said, meaning that job security was not the same issue. “There’s no level of heroism here.”

In a week in which Congress is calling for a leak investigation into stories in The Washington Post, The New York Times and CNN that led to Michael T. Flynn’s forced resignation as national security adviser, heroism is what’s called for. Hopefully there’s enough of it to go around.