Facebook on Friday announced that it allocated CEO Mark Zuckerberg $20 million for security purposes -- that's four times what he received for security in 2016.

The increase shows up in a Friday afternoon financial filing, which showed Zuckerberg's compensation more than doubled from $9.1 million in 2017 to $22.6 million in 2018.

However, that increase is nearly all attributable to higher security costs. The company said Zuckerberg received nearly $10 million in 2018 for his standard personal security, plus an additional pre-tax allowance of $10 million, new this year, "to cover additional costs related to Mr. Zuckerberg and his family's personal security."

These funds are used to cover security at Zuckerberg's "residences and during personal travel." Zuckerberg received $7.6 million and $5.1 million for security in 2017 and 2016, respectively.

Not all of the funds in Zuckerberg's security compensation are for security, the filing said. About $2.6 million of the $20 million were "for costs related to personal usage of private aircraft."

Facebook has a broad security operation, which is known to track the locations of specific users that the company has deemed to be threats to Facebook and its executives.

Zuckerberg's sharp increase in 2018 compensation came after the company navigated a turbulent year riddled with scandals, starting with the Cambridge Analytica scandal in March, in which a political consultancy obtained personal data of Facebook users in an unauthorized way and used it to target political ads; and ending with the Definers Public Affairs episode in November, where Facebook was found to have used a firm to write negative stories about competitors and plant them in the press.

WATCH: Here's how to see which apps have access to your Facebook data — and cut them off