A disqualified driver led police on a 30-mile high speed chase along a main road through south west Wales, a court has heard.
Peter Anthony Turner was seen swerving from lane to lane, ignoring red traffic lights, and driving down a closed-off lane sending cones flying across the carriageway.
The 23-year-old from Swansea was only stopped when police used a "stinger" device to puncture the tyres on his car, and officers were able to use their vehicles to box him in.
Swansea Crown Court heard the chase began just after 4am on May 19 in Carmarthen town centre.
Ashanti-Jade Walton, prosecuting, said an officer on patrol on Monument Hill saw a Ford Fiesta with four occupants on board which had a defective rear light - the officer signalled for the car to stop but instead it sped off towards Johnstown.
A pursuit ensued, with Turner racing westwards on the A40 to St Clears and the Red Roses bypass before turning around and heading back east.
The court heard the defendant was seen "swerving from lane to lane" as he drove along at speeds touching 100mph.
Back in Carmarthen he went through a red light at the Pensarn roundabout, and took the A48 heading for Cross Hands and the start of the M4.
Miss Walton said a stretch of this dual carriageway was subject to roadworks, with one lane coned-off - but Turner drove down the closed lane, undertaking other vehicles and scattering cones across the road.
By now several Dyfed-Powys Police vehicles were involved in the chase, and just before the Pont Abraham roundabout a "stinger" device was deployed which punctured the Fiesta's tyres - police cars then boxed-in the fleeing vehicle and prevented it from entering the motorway.
Turner was arrested and taken to Haverfordwest police station.
The prosecutor said the total length of the pursuit was some 38.2 miles.
Turner, of Myrddin Gardens, Bonymaen, Swansea, had previously pleaded guilty to dangerous driving, driving while disqualified, failing to stop when requested to do so, and driving without insurance when he appeared in the dock via videolink for sentencing.
The court heard he had two previous convictions for 10 offences including driving while unfit through drugs, dangerous driving, and driving while disqualified.
Andrew Evans, for Turner, accepted a custodial sentence was inevitable.
He said his client had got behind the wheel because the owner of the vehicle - one of the female passengers in the car when it was stopped - had drunk alcohol on the night in question. The advocate called that decision "a gross error of judgement" on the defendant's part.
Judge Huw Rees described the events of May 19 as a prolonged piece of dangerous driving, and one which had put police officers at considerable risk as they tried to stop it.
Giving the defendant a one-third discount for his guilty pleas he sentenced him to 12 months for dangerous driving and eight months for driving while disqualified - the sentences will run concurrently, making a sentence of 12 months. No separate penalties were imposed for the other matters. Turner will serve up to half of the 12 months in custody before being released on licence to serve the remainder in the community.
The defendant was further disqualified from driving for three years - the ban to start at the half-way point of the custodial sentence - and he must pass an extended test before he can get his licence back.