Former aides to Mr. Ryan and John A. Boehner, another former House speaker, said both admonished Mr. King, but noted that he was a backbencher of little consequence in the Capitol and argued that he had not said anything nearly as incendiary as what he did last week.

“Along with public pushback, Paul admonished King directly several times about his behavior,” said AshLee Strong, who was a spokeswoman for Mr. Ryan. “These latest comments warrant harsh consequences, and he believes McCarthy did the right thing by booting him.”

David Schnittger, a former aide to Mr. Boehner, recalled that his ex-boss called Mr. King’s comments about young migrants smuggling marijuana “deeply offensive and wrong” and pointed out that the then-speaker had privately used an obscenity to describe Mr. King in the aftermath of those remarks.

Another former aide to Mr. Boehner, Michael Steel, said Mr. King’s behavior had reached “a tipping point” but conceded that congressional Republicans also face a political imperative.