President Obama on Monday signed into law better protections for Peace Corps volunteers, capping a lengthy public campaign by volunteers who criticized the agency for doing little to help victims of sexual assault.

The Kate Puzey Volunteer Protection Act of 2011 is named after a 24-year-old woman who was murdered in 2009 while posted with the Peace Corps in a village in Benin, days after her confidential e-mails about a fellow teacher at her school were mishandled. The suspects in the case have not gone to trial.

The bill was supported by the Peace Corps, unlike previous legislation that failed to pass Congress. Many of the changes in the new law have been adopted in recent months by the Peace Corps, whose director, Aaron S. Williams, acknowledged a “blame the victim” culture.

The legislation protects volunteers who report wrongdoing, requires more rigorous training of volunteers on how to avoid attacks and improves advocacy for sexual assault victims. It passed the House and Senate unanimously. Since Peace Corps volunteers are not considered federal employees, they were not protected by whistleblower laws.

The Peace Corps must create an Office of Victim Advocacy and hire advocates to come to the aid of a volunteer who is assaulted. The Corps will comply with best practices in training volunteers to reduce the risk of sexual assault and making sure medical and security staff respond with sensitivity.

David L. Puzey, Kate Puzey’s brother, said that supporters of the legislation had hoped for a guaranteed number of professional victim advocates. Instead, third-year volunteers will be trained and designated to act as volunteer advocates.

“In the end, we were very happy with the final product,” he said.

The law does not address the Peace Corps’ law enforcement response to violent crime, which was moved in 2008 from the inspector general’s office to its own in-country staff, most of whom have little or no law enforcement training. The shift has been criticized by former volunteers and investigators as a weakness in pursuing justice against perpetrators.

After rape victims and Puzey’s mother, Lois, recounted insensitive treatment by Peace Corps officials at a Congressional hearing in June, lawmakers seemed convinced that tighter controls were needed on the 50-year-old agency founded by President John F. Kennedy.

The women described a culture of insensitivity they said had persisted for decades. Medical personnel often did not use rape kits to collect DNA evidence, they said, and they were told to lie about what happened to protect the Peace Corps’ reputation.

Puzey was murdered in her home after telling Peace Corps officials that a Beninese man who taught with her at a local school was molesting young girls.

The man is now accused of killing Puzey, who was found dead after the e-mails outlining her suspicions fell into the hands of the man’s brother. The brother and the teacher also worked for the Peace Corps.

Three suspects in the case are in jail. Sen. Johnny Isakson (R-Ga.) recently traveled to Benin to put pressure on government officials and urge them to let the FBI reopen the investigation. An appeals court is soon expected to issue a ruling on the request.