WASHINGTON -- Fired FBI Director James Comey has defended the agency on Twitter, writing, "All should appreciate the FBI speaking up. I wish more of our leaders would." President Trump and congressional Republicans have been attacking the FBI for its investigation of potential ties between Russia and Mr. Trump's 2016 campaign.

The president is expected to clear the way as soon as Friday for the release of a classified memo Republicans say shows improper use of surveillance by the FBI in the initial stages of the investigation.

The Justice Department and Democrats have lobbied Mr. Trump to stop the release, saying it could harm national security and mislead the public.

Get Breaking News Delivered to Your Inbox

On Twitter, Comey urged his former colleagues to "take heart: American history shows that, in the long run, weasels and liars never hold the field, so long as good people stand up."

He concluded, "Not a lot of schools or streets named for Joe McCarthy" - a reference to the senator who, in the 1950s, conducted hearings aimed at rooting out Communists in the U.S. government.

Since his firing last May, Comey has made his personal feelings about Mr. Trump known, testifying in detail about personal interactions he says troubled him.

He also authorized a close friend to share with reporters details from a memo he produced documenting one such encounter - a February conversation in the Oval Office in which he said Mr. Trump encouraged him to drop an FBI investigation into former national security adviser Michael Flynn. That revelation promoted the Justice Department's appointment of a special counsel to run the Russia investigation.

Comey has also used language about "weasels" before, most notably in a September 2016 congressional hearing when he defended the FBI's handling of the Hillary Clinton email investigation.

"You can call us wrong, but don't call us weasels," Comey said. "We're not weasels."