In a party-line vote, 49 to 43, senators upheld Mr. Daines’s decision, forcing Ms. Warren into silence, at least on the Senate floor, until the showdown over Mr. Sessions’s nomination is complete. He is expected to be confirmed on Wednesday.

Immediately, Democrats took up Ms. Warren’s cause, urging on social media for Republicans to “#LetLizSpeak.” Ms. Warren said on Twitter that Mr. McConnell had “silenced Mrs. King’s voice” on the Senate floor, to say nothing of “millions who are afraid & appalled by what’s happening in our country.” Within hours of being shut down on the Senate floor, Ms. Warren read the letter from Mrs. King on Facebook, attracting more than two million views — an audience she would have been unlikely to match on C-Span, if she had been permitted to continue speaking in the chamber.

Democrats argued that Mr. McConnell was enforcing the rule selectively, citing examples of Republicans appearing to test the boundaries of Rule XIX. In one instance from 2015, Senator Ted Cruz of Texas accused Mr. McConnell of lying “over and over and over again.” In another, last year, Senator Tom Cotton of Arkansas described the “cancerous leadership” of Senator Harry Reid, the former Democratic leader.

Republicans accused Ms. Warren of violating the rule repeatedly, saying she had been warned before Mr. McConnell’s objection. Senator John Cornyn, Republican of Texas, suggested that Ms. Warren had been rebuked over “a quotation from Senator Ted Kennedy that called the nominee a disgrace to the Justice Department.”

“Our colleagues want to try to make this all about Coretta Scott King, and it is not,” he said.

But when Senator Chuck Schumer, the Democratic leader, sought clarification, he was informed that while a warning was issued over the letter from Mr. Kennedy, the ruling itself hinged on Mrs. King’s letter. That judgment came from Senator Mike Rounds, Republican of South Dakota, who had taken over as the presiding officer.

In either event, Republicans suggested, the episode spoke to Democrats’ inability to accept the results of the 2016 election — and, more narrowly, to adhere to the rules of a body where decorum has often fallen away.