Mr McQuoid said the friend's quick thinking also played a part in the rescue - in which police and members of the public formed a human chain - after he raised the alarm when he saw Joshua was struggling.
"He's our little hero at the moment."
A male German tourist went to the boy's aid but was unable to keep hold of him and had to return to shore.
"I'm just so thankful to all the people that were there - mainly the police officers, because if they hadn't gone in, he wouldn't be here today," Mr McQuoid said.
Police were called about 4.55pm and the first officer on the scene went into the water, however he was unable to maintain a hold on Joshua due to the heavy surf.
The officer was then joined by members of the public who tried to help.
Mr McQuoid described his son's ordeal as "like being in a washing machine".
A second officer entered the water and reached the boy. He tried to bring the boy back to shore but had to battle to maintain a grip on him in the heavy surf.
At times he lost hold of Joshua, who was underwater for up to 20 seconds at a time and fading fast.
Police instructed members of the public and other police staff to form a human chain and this, combined with the second officer moving the boy towards the shore, saved him.
When Joshua was brought to shore he was unresponsive, physically spent, and could not move unaided, police said.
He was given first aid on the beach by members of the public.
The first two officers, who by this stage were also exhausted by the surf, were also assisted to shore.
Mr McQuoid said he went to the police station last night to personally thank the rescuers with his son.
The conditions at the time were treacherous with dumping waves and an extremely strong undertow.
Joshua was taken to Hawkes Bay Hospital but has since being discharged.
Police said they were proud of the heroism displayed by their officers and members of the public.