WASHINGTON (AP) — A unanimous Supreme Court has ruled public officials can sometimes be sued for blocking their critics on social media, an issue that first arose for the high court in a case involving then-President Donald Trump.

Justice Amy Coney Barrett wrote for the court Friday, saying officials who use personal accounts to make official statements may not be free to delete comments about those statements or block critics altogether.

But Barrett wrote that “state officials have private lives and their own constitutional rights.”

The cases forced the court to deal with the competing free speech rights of public officials and their constituents in a rapidly evolving virtual world.