A Caernarfon man struck his brother with an imitation handgun during an unprovoked attack.
Jamie Williams was jailed following an incident at the home of a relative's girlfriend in April.
The 24 year-old of Chapel Street pleaded guilty to five charges including assault causing physical harm and possessing a firearm with intent to cause fear of violence.
Mold Crown Court heard Williams had punched his brother in the face several times and then used the imitation firearm to hit him on the head with the handle.
His brother fell unconscious but Williams continued to punch him and stamp on his head causing serious injuries.
Williams then used the imitation firearm, which had been modified to fire bullets, to threaten others who were at the scene of the attack, trying to help his victim.
In court, he also admitted possessing a firearm and ammunition without a certificate, converting an imitation firearm into a useable one and possessing cannabis.
He was sentenced to five years and seven months in prison.
Following sentencing on Monday, Detective Inspector Chris Burrow of North Wales Police said: "Williams carried out a violent attack on his own brother, which could have easily resulted in a fatality."
"This will undoubtedly have a lasting impact on the victim and those who witnessed this terrifying assault."
"Incidents of this nature are extremely rare in North Wales, and I would reassure residents that carrying weapons will not be tolerated and we will robustly pursue any intelligence reported to us."
The handgun, ammunition and cannabis will be destroyed as part of a forfeiture order.


Busy May half-term for Môn Actif
Caernarfon man charged after knife threats
Body found in search for missing woman
No verdict in Eisteddfod rape trial
Yacht rescued off South Stack