A "sweaty and gurning" driver led police on a chase during the early hours after failing to stop, a court heard.
Niall Bright was driving through Bargoed with three passengers when a patrol car signalled for him to stop.
After failing to stop Bright, who was disqualified from driving at the time, led officers on a chase where he collided with police before being forcibly stopped.
Cardiff Crown Court heard that at around 1am on October 11 a police car spotted Bright in Station Road in Bargoed.
They flashed their sirens in order for the 23-year-old to stop but he continued driving and a chase ensued. Dashcam footage played to the court of the incident shows Bright swerving across the road at speeds up to around 50mph.
A stinger was deployed by officers which punctured all four of Bright's tyres on his Ford Ka. Despite this he continued driving for around a mile and a half causing sparks to fly from his wheels.
Another marked police vehicle joined the roughly 13-minute pursuit and after pulling ahead of Bright managed to box him in and cause him to stop.
Dashcam footage showed Bright exiting from the passenger side before being arrested by officers.
Find out the crime rates in your area here:
Nik Strobl, prosecuting, said the officer who arrested Bright described him as "boiling hot and sweaty, with large dilated pupils and gurning".
He answered no comment when interviewed by police and later pleaded guilty to dangerous driving, driving while disqualified, and driving without insurance. The court heard Bright has 10 previous convictions for 22 offences.
Stephen Thomas, mitigating, said while nobody was injured in the pursuit his client recognised he was "very foolish" and was "relieved" nobody was hurt.
Judge David Wynn Morgan said: "It was a prolonged piece of very bad driving. You had passengers. You endangered them. It was the most extremely stupid piece of driving."
Bright, of Commercial Road, Abercarn, was jailed for a total of 14 months and banned from driving for four years. He must also pay a £150 victim surcharge.