In the tourist-y areas where there are five-star hotels, there are as many Europeans and Americans as the locals, yeah, you're safe. But if you are in non-developed/non-commercial, non-tourist areas, don't kid yourselves in thinking that your "I'm an American" status allows you to be protected by the 4th Amendment (illegal search and seizure) or that because you are an American, they will bend their law system to make sure you go through the American process of law. If you believe that you are safe simply because you are an American, you are an idiot.
And don't think for a second that developed European countries will treat Americans better. It doesn't matter if you're in countries such as Germany, France, or Spain. Unless you're a somebody and you can drop names of important people in their country that you have on speed dial, the typical foot soldier military police doesn't give a hoot. You're no different from the civilian locals. They will hold you, they will try to extort cash from you, they will threaten physical harm, and yeah, it's probably 0.000000000000 00000000000000 01% chance that they will actually do physical harm to you, but then once they're done with you, they just release you and say "go...". Then what will you do? Who will you talk to? The local police captain whom employs these foot military police? You think they are going to crackdown on their own? Who will you report? The military police in Europe, Middle East, and South America do not wear badge numbers. And since they are not PEACE OFFICERS (like our USA city police), they don't have to walkie-talkie in a "10-66" (suspicious person) and 10-26 (arresting subject) to the dispatcher. There will be no trace or evidence that anything actually ever happened to you and even if a local saw this happening to you, they will turn around faster than you can say "help!".
I will say, however, that developed Asian countries/city-states such as S. Korea, Japan, Singapore, and Hong Kong, tend to let Americans get away with stupid stuff simply because they are American tourists. It's partly the culture; Asian countries/government don't want to be seen on the news that they bloody-nosed and manhandled a tourist or conspired in a murder of a tourist because it will look bad upon all of the society and people.