Facebook is following in the footsteps of its rival MySpace by reaching an online safety agreement with the attorneys general of 49 U.S. states and Washington, D.C.

As part of the agreement, Facebook is pledging to implement new safety measures and refine existing ones, as well as affirming its participation on the Internet Safety Task Force that MySpace launched in January with the attorneys general. Specifically, Facebook is making commitments around locking profiles of members who are under 18 years old, Facebook announced Thursday.

"Facebook already implements most of the enhancements that are part of this agreement. The company's cooperative relationship with the Attorneys General is long-standing and will continue indefinitely," a spokeswoman for Facebook wrote via e-mail.

Chris Kelly, Facebook's chief privacy officer, said in a statement that the company is "proud to join 49 states and the District of Columbia in affirming our commitment to these principles and to continue improving our technology and policy solutions to keep kids safer on Facebook."

Some of the safety and privacy features Facebook will "continue and enhance" as part of the agreement include age and identity identification tools, automatic warning messages when a minor is in danger of giving personal information to an unknown adult and restricting members' ability to change their listed ages.

Facebook is also pledging to be aggressive in responding to requests to remove inappropriate content and groups, immediate removal of links to pornographic sites and prominent display of privacy information and safety tips.