The U.S. Justice Department is changing its social media policy following a tweet mistakenly sent from the department's official account on Tuesday that called CNN "the biggest troll of them all," a department official said.

In a statement, the staff member in the public affairs office "erroneously used the official Department of Justice Twitter handle to post a tweet that was intended for a personal account."

The statement did not identify the staff member, but said the person's access to the department's social media accounts had been revoked.

Going forward, the Justice Department's public affairs office will implement "procedural changes" around the use of social media accounts and provide additional training to its employees, the statement said.

The tweet was sent early on Tuesday in response to a CNN story about the campaign of Donald Trump denying his wife Melania's speech at the Republican Nominating Convention was plagiarized from a 2008 speech by first lady Michelle Obama.

"CNN is the biggest troll of them all lmao #petty," said the tweet, which was later deleted.

The Justice Department said, "the tweet does not represent the department's views and was inappropriate for the Department of Justice’s official account."

"The Justice Department takes this matter very seriously and will continue to take the appropriate steps to prevent it from happening in the future," said the statement.

(Reporting by Julia Edwards, editing by G Crosse)