A 20-year-old man has been sent to a young offender's institution after he admitted causing his friend's death by dangerous driving.
Gethin Jones, from Trawsfynydd in Gwynedd, had been friends with Geraint Williams, 19, since primary school.
Mr Williams was a front seat passenger when Jones' car hit a wall on a bend on the A496 at Llanbedr near Barmouth.
The judge at Caernarfon Crown Court told Jones he had complete disregard of the danger and for other road users.
Judge Merfyn Hughes QC said Jones' Honda Civic had entered a 40 mph area at a speed of between 67 and 82 mph.
One witness told the court he was driving like an idiot.
The judge said the car had been driven for several miles, on a Saturday night last June, with a completed disregard of the danger to other road users.
There had been a significant degree of showing off and competitive driving, he said.
Jones' barrister said his client was deeply remorseful, and had himself narrowly escaped death in the crash.
He said Jones could remember nothing about the accident because of his injuries.
Jones was sent to a young offenders' institution for four years and eight months.
He was also banned from driving for four years, and must take a re-test before getting behind the wheel again.