It was late Wednesday night. An Orwellian storm had whipped across Kenya’s capital, and Mr. Kaikai was caught in it. Hours earlier he and two NTV colleagues, anchors Ken Mijungu and Larry Madowo, were tipped by their police sources that officers were heading to the newsroom to arrest all three.

None knew when it would happen or why, exactly — in Kenya, you generally hear the charges only when you appear in court — but they all had a pretty good idea.

One day earlier they had broadcast the highest-stakes political-opposition gathering in recent memory, defying warnings from President Uhuru Kenyatta.

For months, Kenyans had been on edge, waiting for Raila Odinga, an opposition politician, to make good on promises to inaugurate himself as “the people’s president.” Mr. Odinga lost the 2017 election to Mr. Kenyatta, insisting the original vote was fraudulent and sitting out a court-ordered do-over.

Although Mr. Kenyatta was sworn in for a second term in November, Mr. Odinga has refused to recognize him as legitimate — and planned his own inauguration ceremony.

To some, Mr. Odinga’s plan was petulant political theater, and Western diplomats encouraged Mr. Kenyatta’s government to ignore it. But the police threatened to crack down hard on anyone who attended the “swearing in” held on Tuesday.

As security officers have repeatedly demonstrated over the last three months, it was hardly an empty threat.

The government’s response represents the latest chapter in a crackdown on political expression in Kenya, a stable democracy that had seemed to overcome decades of censorship and abuse.

Larry Madowo, left, and Linus Kaikai of Nation Television on Thursday. “We saw what happened on Tuesday as an event,” a colleague said. “They saw it as an opportunity to crack down on us.”Credit Baz Ratner/Reuters

Mr. Kenyatta got involved personally last week, raising the pressure not on his political rivals, but on the news media. He summoned the owners of Kenya’s major broadcasters to his residence and warned them not to cover Mr. Odinga’s ceremony.

Hanningtone Gaya, the chairman of the Media Owners Association of Kenya, described the encounter as a “dressing down” and told Mr. Kaikai that the group had been “read the riot act.”

Mr. Kaikai, who is chairman of Kenya’s editors guild, denounced the president’s warning as a “brazen threat” and wrote a scathing public letter against media intimidation.

And for a few hours on Tuesday, his NTV journalists broadcast from the event at Uhuru Park. So did two other major stations. But at 9 a.m., government officials and police officers arrived at the stations’ transmission center, about 20 miles from Nairobi, and disabled broadcasting equipment.

The stations went off the air.

Tensions only worsened as the day went on. The government declared part of the opposition coalition an “organized criminal gang.”

Fred Matiang’i, the interior minister, said at a news conference on Wednesday that he would investigate the TV stations and keep them off the air indefinitely. He said the blackout had protected Kenyans from incitement — and then he went further.

“A massacre of catastrophic proportions was going to happen,” he said, without offering evidence. “The intention was that it happens, and it’s blamed on the police.”

By coupling the blackout with the withdrawal of police forces from the site, Mr. Matiang’i said, he had kept Kenyans safe.

Mr. Matiang’i also promised a reckoning with the planners of what he described, again without evidence, as a sinister plot that had been foiled.

“The individuals and organizations involved in this, wherever they are within the borders of this country, will feel it,” he said. “And they will be so sorry.”

Mr. Odinga at Tuesday’s event. The original presidential vote was fraudulent, Mr. Odinga claims, and he sat out a court-ordered do-over.Credit Ben Curtis/Associated Press

Roughly an hour later, Mr. Kaikai — who had set off a firestorm with his defiant renunciation of the president’s warning — was told that police officers had surrounded the NTV newsroom. The information came around the same time news broke that an opposition lawmaker, T. J. Kajwang, had been arrested. He was expected to be charged with having administered Mr. Odinga’s “oath.”

As the evening wore on, Mr. Kaikai’s colleagues took care of whatever details they could. One brought him a toothbrush, another a blanket. The place was full of food — “they asked me what I want for my ‘Last Supper,’” he joked — and he signed papers, in triplicate, meant to expedite his bail.

“Tomorrow you’re going to look dapper, I hope,” a lawyer told him with a smile. “You need your best suit, and a flower for that buttonhole thing.” The joke didn’t quite land. “O.K., you can skip the flower,” he offered.

Mr. Kaikai tried to keep up his spirits, but worried aloud about the aftermath of a police raid.

“What happens here is not that they just take you to the police station. They cause you psychological trauma,” he said.

Stories abound here about police officers driving suspects around for hours before booking them at the station, which starts a kind of civil-rights clock: Officers have 24 hours from booking to charge a suspect, who can then appeal for bail.

In November, David Ndii, an opposition leader, was arrested at his hotel and went missing for five hours before a local police station reported having him in custody.

These things weighed on Mr. Kaikai as he awaited the arrest he was certain was coming.

“Look, they’re not about law and processes,” he said. “These are not law enforcers. They’re political henchmen.”

That night, Mr. Madowo took refuge in his studio, laying a Maasai cloth beneath the desk that holds his soundboard. “Who knew a production studio could have so many uses?” he said.

George Kinoti, a spokesman for the National Police, did not return repeated calls or messages seeking to confirm whether officers had been sent to arrest the journalists. Mwenda Njoka, spokesman for the Interior Ministry, denied any knowledge of the events.

But in the end, the police did not storm the offices. Late Thursday afternoon, the High Court suspended the blackout, saying the stations could resume broadcasting until the court hears arguments on the issue. And Mr. Kaikai, Mr. Madowo and Mr. Mijungu headed to court to seek “anticipatory bail,” which would essentially keep them free even if the police filed charges in court.

They remained defiant.

“If you’re a journalist, what we do is tell the truth. You don’t hide things. You don’t sugarcoat,” Mr. Mijungu said. “We saw what happened on Tuesday as an event. They saw it as an opportunity to crack down on us.”

Correction: February 1, 2018
An earlier version of this article incorrectly spelled the surname of Kenya’s interior minister in one reference. As correctly noted elsewhere in the article, he is Fred Matiang’i, not Mantiang’i.