Contrary to popular opinion, Columbia is not necessarily the most dangerous place in Latin America. Over the last few years Peru has become the continent's largest cocaine producer and a hub for drug trafficking. This has resulted in a significant rise in safety problems.
Certainly safety problems are evident in Peru. This phenomenon has increased in line with the rise in drug production. Thus some areas around Ayacucho and the frontier zone with Columbia are best avoided due to the presence of drug traffickers.
As a tourist, the main risks to which you will be exposed during your trip to Peru are thefts or assaults. Less dangerous, but still not very pleasant, are the scam attempts or the inflated prices that people try to make you pay.
Don't tempt fate by trying to buy drugs. You're putting your finger in very dangerous pie that is best avoided in Peru. The dealers are often informers and you have every chance of being reported to the police. Be aware that as well as the matter of the war against drugs, Peru likes to use people as an example, penalties are very high and detention conditions are very tough.
Talking of natural dangers now rather than those caused by other people, Peru is situated in a seismic zone where the risk of earthquakes is very real.
Faced with the increase in security problems the authorities have reacted well and there is a visible police presence in tourist areas. It's up to you to ask and decide where you want to go. Even though it's safe enough in the historic centre of Lima, you only have to go over a bridge to find yourself in the Rimac quarter, where you could be exposed to the risk of theft or assault. As a general rule, don't show any visible signs of wealth, try not to look too much like a tourist and try to look confident and give the impression that you know exactly where you are, even if in reality you are lost. At night, never go out on foot and only take official taxis.
In case of assault, don't resist and calmly hand over whatever you are asked to. It can be wise to keep a small sum easily accessible, since giving this could be enough, you can keep the rest hidden.
Keep an eye on your bags during bus journeys too. If a police officer insists that you follow him, he could turn out to be a fake. Don't comply and remain polite but firm and passers-by for help.
The danger does exist but don't be too paranoid. In the majority of cases a holiday in Peru all goes very smoothly.