Facebook is giving users control over what happens to their accounts when they die.

The social network rolled out a new feature Thursday that allows users to designate a specific friend who will be able to access their account after they die.

See also: How to decide who inherits your Facebook account

The feature, called legacy contact, appears in Facebook's security settings menu. There, you can select a specific Facebook friend who will be able to control certain aspects of your page, like your profile and header image, after you die. Alternatively, users can opt to have their account deleted after they pass away.

The social network already has a memorialization system in place where people can let Facebook know a user has passed away. Once Facebook verifies that person has died — typically through an obituary or news article — the account becomes memorialized. Memorialized accounts don't surface in friend suggestions, ads or other "public" places on Facebook.

The legacy contact feature can be activated from Facebook's security settings menu. Image: Facebook

With the legacy contact feature, Facebook is taking the memorialization process a step further. After an account becomes memorialized, a legacy contact is able to pin posts to the top of a page, respond to incoming friend requests and control the profile and header image on an account. Additionally, they can download an archive of the user's photos and other posts, if given permission by the original account holder. Legacy contacts can't view messages or change other account settings.

Facebook is also making changes to the appearance of these memorialized accounts, which will now have a "remembering" label before the name to let others know it's an account of someone who has since passed away.

The goal, according to Facebook product manager Vanessa Callison-Burch, is to make it more which accounts have been memorialized and provide a way for friends and family to manage their loved one's accounts.

Memorialized accounts will now include a "remembering" label before the person's name. Image: Facebook

"Family members will tell us 'I really want to communicate information about the memorial service with this person's friends.' The idea of a pinned post comes from there," says Callison-Burch. "People typically don't think about this very much until they have an experience of loss."

The legacy contact setting is available to users in the U.S now and will eventually roll out in more countries, though specific timing is unclear.