A hacker or spammer can do some serious damage to your Facebook account — but what about the watchful eye of the government over your private messages?

Facebook said it will begin warning users if it detects a user's account is being targeted or compromised by a nation-state or a state-sponsored actor.

See also: What the massive government breach means for your personal data

"While we have always taken steps to secure accounts that we believe to have been compromised, we decided to show this additional warning if we have a strong suspicion that an attack could be government-sponsored," Facebook's Chief Security Officer Alex Stamos wrote in a blog post on Saturday. "We do this because these types of attacks tend to be more advanced and dangerous than others, and we strongly encourage affected people to take the actions necessary to secure all of their online accounts."

When Facebook has strong evidence that a government is intruding on a user's Facebook account, the company will send this warning:

Image: Facebook

Stamos added that Facebook likely won't be able to provide any additional explanation as to why it suspects a users's account has been targeted, but the message doesn't mean Facebook as a whole has been compromised. He also doesn't single out any particular state or government in the blog post.

If you receive the message above, you should enable two-factor authentication, which is under Login Approvals on Facebook. Stamos further suggests that users should "rebuild or replace" their computer system, as it's likely to be infected by malware.

In Facebook's last transparency report from November 2014, the company revealed that government requests for Facebook user data in the first half of 2014 increased 24% from the second half of 2013. However, those are formal requests, so they do not include attempts by governments or government-sponsored agents to obtain users' information without permission. It's difficult to estimate how often those incidents occur, though the mere fact that Facebook is now warning users about such attempts suggests they are not uncommon.