HARTFORD, Conn. — Facebook, the world's second-largest social networking Web site, is adding more than 40 safeguards to protect young users from sexual predators and cyberbullies under an agreement with officials nationwide that was announced Thursday.

The measures include banning convicted sex offenders from the site, limiting older users' ability to contact subscribers under 18 and participating in a task force set up in January to find ways to verify users' ages and identities.

"The agreement marks another watershed step toward social networking safety, protecting kids from online predators and inappropriate content," said Connecticut Attorney General Richard Blumenthal, who announced the agreement Thursday with his counterparts in other states.

Officials from Washington, D.C., and 49 states have signed on.

Facebook, which has more than 70 million active users worldwide, already has enacted many of the changes and others are in the works, its officials said Thursday.

"The attorneys general have shown great leadership in helping to address the critical issue of Internet safety, and we commend them for continuing to set high standards for all players in the online arena," said Chris Kelly, Facebook's chief privacy officer.

Texas did not endorse the agreement or a similar one reached in January among the other states, the District of Columbia and MySpace, the world's largest online social network with 200 million users worldwide. Texas officials say they want the sites to work faster on verifying users' ages and identities.

The attorneys general have been negotiating for months with Facebook, based in Palo Alto, Calif.

Facebook and MySpace let users block online bullies and others from contacting them. They also can conceal their "online now" status and use privacy controls to limit who can view their images.

Among other measures, Facebook agreed to keep tobacco and alcohol ads from users too young to purchase those products; remove groups whose comments or images suggest they may involve incest, pedophilia, bullying or other inappropriate content; and send warning messages when a child is in danger of giving personal information to an adult.