It was the second time in the tournament that Nadal had lost a set after defeating Francisco Cerundolo earlier in the week as he started the chase for a 23rd Grand Slam title.
“Every day is a challenge, it’s true. All rivals are difficult,” Nadal said in an interview on the court.
“We are playing against the best players in the world… Every day is an opportunity to improve and today I finished so it gives me a chance to continue – very happy about it.”
After Nadal took the first two sets, Beranquis finished in second place. World No. 106, bounced back in third thanks to an early break in the pitch.
In the fourth match, there was a 50-minute delay due to rain to allow time for the roof to be closed, but Nadal was already leading 3-0 in the set and soon ended the match just over three hours after play resumed.
On Saturday, the 36-year-old will face 27th-placed Italian Lorenzo Sonego in the third round.