MADRID — The United States Embassy in Madrid has warned Americans visiting Spain to take extra precautions because of “a steady increase in the number of sexual assaults” over the last five years in the country.

Embassy officials said they were unaware of any similar alerts for a European nation.

The security alert, issued on Monday, came as the Spanish authorities are investigating a rape accusation filed by three American sisters against three Afghan men over events on New Year’s Eve in Murcia, in southeastern Spain. It also warned of the challenges that those who experience sexual assault face when seeking justice in the Spanish legal system.

The embassy said its alert was a response to an increase in sex attacks “against young U.S. citizen visitors and students throughout Spain.” It cited data from Spain’s interior ministry, noting that the embassy in Madrid had dealt with six reported cases of sex attacks in January, which followed from 34 such reports last year.

In an interview with the Spanish newspaper ABC, Benjamin G. Ziff, the deputy chief of the United States mission in Madrid, said “the issue is not only about data of sexual attacks and harassment, but the treatment that North American citizens get after the attack.”