Facebook unveiled a change to Instagram’s advertising and privacy policies on Tuesday, saying it would protect teens, after years of criticism that the photo-sharing site had not done enough to protect underage users from sexual predators and bullying.

The social network, which owns Instagram, said it would change its advertising policy to reduce hyper-targeted ads to teens. Advertisers on both Instagram and Facebook, who previously used people’s interests and activity on other websites to target their ads, will now only be able to use age, gender and location to show ads to users under 18.

New Instagram accounts created by people under the age of 16 will also be private by default, meaning the account’s posts can only be viewed by valid followers, the company said. Facebook said its research indicates that 80 percent of young users will be in the default private setting.

Facebook also said it was developing technology to prevent accounts with “potentially suspicious behavior” from viewing or communicating with people under the age of 18 on Instagram.

Legislators on both sides of the aisle have called for more prototyping protection for children. The proposed bill, with bipartisan support, the Children and Teens’ Online Privacy Protection Act, would ban advertising targeted at children and require user consent to collect information from users under the age of 15.

Still, as Facebook continues to move forward with plans to create Instagram for children under 13, the expansion has been opposed by the attorney general in 44 states and jurisdictions, as well as an international alliance of 35 children and consumer groups. Facebook critics cited research that the use of social media has led to increased mental distress, body image anxiety and suicidal thoughts.

In a blog post on Tuesday, Pavini Diwanji, Facebook’s vice president of youth products, said the company was using artificial intelligence to check the age of users. For example, a birthday message is directed at the user, for example, someone’s age can be used to find out their age, in addition to the age entered in Instagram and other Facebook apps.

“This technology is not perfect, and we’re always working to improve it, but that’s why it’s important that we use it along with many other signals to understand people’s age,” Ms. Diwanji wrote.