I've passed through over two dozen countries (and counting), but the Huaquillas border crossing between Ecuador and Peru is by far the most hazardous I've experienced.
My Ecuadorian bus (loaded with lama wool) deposited me outside the immigration office, 5km south of Huaquillas. I waited patiently as the border official sat on my passport for 10 minutes as he processed the locals behind me.
Ecuador and Peru have created what I'm calling a "4km kill zone" between immigration offices.
A dangerous, shady town lurks on the Pan-American Highway between these checkpoints, where the fleecing or mugging of tourists has become commonplace. Novice travelers are hit especially hard. I received an e-mail from my friend Lucy, who ventured into Peru before me. Unfortunately I didn't get it until after I crossed, but her warnings were most accurate:
Hey, good luck for the border crossing into Peru, there is a major scam going on there. They will try and get you to change a lot of money at the border saying there isn't any banks in Máncora and to get the exit stamp you need to show $300 Soles its a load of crap… and then they want to put you in a cab to drive you in the middle of nowhere and rob you. So just get into a cab away from the hustle and bustle and be suspicious of people trying to be too helpful, they are all connected. Good luck!
After a "friendly" Peruvian guy waited around with me for the duration it took to stamp me out of Ecuador, he casually offered me an exchange rate at less than 60% of what I should have gotten. The border was 2km away; I was forced to take a taxi. A driver tried to overcharge me, but I knew the rate beforehand (US$1).
What I didn't know was that the immigration office for Peru was 2km from the border (something I didn't believe at first), and that my cab driver wouldn't be crossing over. He deposited me at the frontier in a mass of shady money changers with fixed calculators who tried to either charge me a horrible or false rate, pass counterfeit bills off to me (a real problem in Peru), or convince me that I had to show a wad of Peruvian cash to the immigration official to be allowed entry into the country (which I conveniently didn't have)—bastards.
I was really on edge. I hadn't talked with any other travelers about the border ahead of time, but knew from my surroundings that I was in an exceptionally hostile environment.
The streets were busy, chaotic. Now in Peru, I couldn't see a taxi anywhere. A man approached me claiming to be a taxi driver, and pointed to his car below us (we were standing on a short bridge that straddled the border). We agreed on a price after a negotiating (another US$1), and I cautiously followed him to his car (unmarked as a cab except for a sticker on the windshield). His "license" hung from the rear view mirror.
He opened both doors on the passenger side of the car, expecting me to ride shotgun and put my backpack in the backseat—yeah, right. It went between my legs, up front, with me.
After some time in the car we took a turn down a gravel side street. We had been doing some friendly chatting (he was kindly pushing me to hire him for the 40-minute ride to the next town), when I asked him rather sternly where we were going. The immigration office, he assured me. We showed up not longer after.
A 90-day stamp in my passport for Peru, no proof of cash or onward ticket was necessary.
Next came a collectivo (shared mini-bus) to Tumbes for US$0.50, followed by another (ugh, 21 people in a vehicle meant for 12 for over two hours) to Máncora for US$1.50. A rough start to Peru.
I hear there are some 1st class bus lines that will take you through the border without having to deal with the kill zone—I would strong recommend such a thing if the opportunity exists.