Robert Mueller was out of line to imply President Donald Trump might have obstructed justice during the two-year Russia investigation, attorney Alan Dershowitz told Newsmax TV.

Minutes after Mueller addressed the media and the American public Wednesday morning to wrap up his Russia probe, Dershowitz joined Newsmax TV host John Bachman for his immediate thoughts.

"I think it was improper for Mueller to say that if there had been evidence that the president hadn't committed a crime, we would have said so. That sounds to me very much like what [former FBI director James] Comey said about Hillary Clinton and was so criticized," Dershowitz said.

"I don't think that was in his place to say that. He could just as easily have said, if there were evidence that [Trump] had committed a crime, we would have said so. But the implication was that maybe he committed a crime, but there wasn't sufficient evidence to prove it.

"I think he went beyond the authority of a prosecutor and committed the same error that we all condemned Comey for committing in relation to Hillary Clinton."

Dershowitz argued Mueller, who announced in his Wednesday morning remarks he is resigning as special counsel and returning to private life because his investigation into Russian election interference is over, gave a "different twist" on his report than Attorney General William Barr.

"The twist came from that one statement, saying if there were compelling evidence that he hadn't committed a crime, we would have said so. That was putting a spin on it," he said.

Dershowitz added he wants independent special counsels to become a thing of the past moving forward.

"I would like to see structural changes made in the Justice Department, where we have a full-time, independent unit within the Justice Department that can routinely investigate these kinds of allegations," he said. "I think the role of the special counsel or special prosecutor has proved to be historically a failure."