President Trump has long derided the mainstream media as the “enemy of the people” and lashed out at NFL players for kneeling during the national anthem. On Tuesday, he took his attacks on free speech one step further, suggesting in an interview with a conservative news site that the act of protesting should be illegal.

Trump made the remarks in an Oval Office interview with the Daily Caller hours after his Supreme Court nominee, Brett M. Kavanaugh, was greeted by protests on the first day of his confirmation hearings on Capitol Hill.

“I don’t know why they don’t take care of a situation like that,” Trump said. “I think it’s embarrassing for the country to allow protesters. You don’t even know what side the protesters are on.”

He added: “In the old days, we used to throw them out. Today, I guess they just keep screaming.”

More than 70 people were arrested after they repeatedly heckled Kavanaugh and senators at Tuesday’s hearing.

Trump has bristled at dissent in the past, including several instances in which he has suggested demonstrators should lose their jobs or be met with violence for speaking out.

In July, ahead of his visit to Britain, Trump told the Sun newspaper that reports of large-scale demonstrations against him in London — including a 20-foot-tall blimp depicting an angry baby Trump — had offended him.

“I guess when they put out blimps to make me feel unwelcome, no reason for me to go to London,” Trump said. Months earlier, Trump had implicitly rejected reports that his initial plans to visit in the spring were scuttled because of fears of protests.

Last September, Trump called on NFL owners to fire players who kneel during the national anthem to protest systemic racial injustice.

And in several appearances during the 2016 campaign, when demonstrators interrupted his rallies, Trump at times appeared to encourage violence against them.

Trump has also prompted cries of “dictator envy” for remarks in which he seemed to emulate North Korean leader Kim Jong Un. “He speaks, and his people sit up at attention. I want my people to do the same,” Trump told Fox News Channel in an interview after his Singapore summit with the North Korean leader.