WASHINGTON — There was a time in the not-too-distant past when President Trump refrained from flamethrowing messages on Twitter.

That time is over.

Never mind that his aides have asked him to stop. Never mind that now the lawyers have told him to stop. Even though his White House has been warned that tweets could be used as evidence against him, Mr. Trump has made clear in the days after returning from a largely Twitter-free overseas trip that he fully intends to stick to his favorite means of communication.

Since the weekend, he has gone after favorite targets, like the “fake news” media, Congress and Hillary Clinton, and even some new ones, like Germany and the comic Kathy Griffin. He denounced the “witch hunt” investigations into contacts between his associates and Russia. And he fomented a worldwide mystery with a middle-of-the-night post that introduced a new word to the language: “covfefe.”

Throughout last year’s campaign and into the early months of his presidency, the concern among Mr. Trump’s advisers was mainly political. Every time the president let loose with one of his 140-character blasts, it distracted from his agenda and touched off a media frenzy that could last for days. But now the worry has turned increasingly legal. With multiple investigations looking at whether the president’s associates collaborated with Russia to influence the election, any random, unfiltered tweet could become part of a legal case.