The Spaniard struggled against the world number 78, who produced some sterling tennis on the clay of Sao Paulo.
Berlocq was eventually overpowered 3-6 6-4 6-4 in two hours and 24 minutes, but Nadal admitted that he was feeling the pressure.
"I knew there was a chance I was going to lose it, but luckily I was able to recover in the end," Nadal told reporters.
"I'm very happy because it was a very difficult match against a great opponent. I'm happy to reach the semifinals and now we'll see how it goes."
Nadal will now face the 111th-ranked Martin Alund in the last four.