A 29-year-old man has admitted trying to murder four young children by beating them with a hammer and then crashing a car into a wall.

Owen Scott was arrested after the car he was driving crashed into a pub in Barnsley, south Yorkshire, on 23 August last year.

Four children were in the vehicle – two girls, aged seven and eight, and two boys aged 21 months and nine months. They were taken to hospital in a serious condition with injuries “not all thought to be consistent with the collision”, according to police at the time.

At Sheffield crown court on Monday, Scott pleaded guilty to four counts of attempted murder and driving a vehicle dangerously before the crash at the Travellers Inn.

Scott, from Fawley near Southampton, spoke only to confirm his name during the hearing before the judge, Mrs Justice O’Farrell.

Michelle Colborne QC, defending, told the court: “Although he has been in custody since the commission of the offences his psychological position was unclear. He may have been suffering from short-lived psychosis.

“There’s a mitigation which demonstrates at the time he was likely suffering from psychosis, short-lived, affecting his self-control. He has very little or no memory of the events in the car.”

During a previous hearing, Sheffield crown court was told how Scott had a hammer in the car at the time and used it “to inflict blows on the children in the car to their heads”.

Simon Kealey QC, prosecuting, told the court: “As a result of failing to kill them in that way he ended up driving towards the pub.”

The Dacia Logan was travelling on the A629 Copster Lane when it left the road and crashed into the front wall of the pub, in the Oxspring area of Barnsley, at about 12.25am on 23 August.

Scott was remanded in custody for further psychiatric reports.

He will be sentenced on 15 February.