A former London gang member who brandished a knife in shop during a stand off with an armed posse has been jailed for 22 months.

Zak Bako was at Home Bargains on Hobley Drive when the men, thought to be friends of his girlfriend's ex, turned up and threatened him with an array of weapons.

But rather than retreat and ask for the police to be called the 22-year-old, who was out of prison on licence, confronted them with the knife he had been carrying.

Kirsty Real, prosecuting, told Swindon Crown Court Bako had gone shopping with his girlfriend and her five-year-old son on the afternoon of Monday March 19.

They were in the Home Bargains car park when a van pulled up.

Footage from CCTV showed four or five people pour out of the vehicle armed with an axe, baseball bat, wheel brace and crow bar.

Ms Real said "The defendant's partner left her son with one of the shop staff and she went outside to be with her partner. Staff described the child as being very distressed and upset."

The shop workers said they then saw Bako pull out a large knife and wave it above his head as he threatened the other group.

"He then backed in to the store. One of the group had come shortly in to the store. Shop staff shouted that the police had been called and the larger group dispersed," the lawyer said

"The defendant was invited to wait in the store for the police. The defendant and partner and child got into a car and drove away."

She said the police traced Bako's partner's car, went to her home and found Bako hiding under a bed.

When he was questioned he said that he had seen the group in the van as he left Aldi and they had been threatening him with weapons.

He said he thought his girlfriend's former partner, and the father of her young son child didn't want her to be with him and that the group were friends of his.

Bako, of Cottsway Court, Swindon Road, Stratton St Margaret, pleaded guilty to possessing a bladed article.

The court heard he had a number of convictions for robbery and got five years with a five extended licence in 2103 where a man was stabbed.

He was released in June last year on a licence which ends in 2023 and has a conviction for having a bladed article in 2009.

Richard Williams, defending, said he was supported by his partner who was at the scene and the incident illustrated why he was carrying a knife.

He said all his previous offending was in the London area where he was in a gang and after his release he came to Swindon for a fresh start and is due to become a father.

Jailing him Judge Jason Taylor QC said "This was a public place where members of the public were present and of course there was a five-year-old child present who was distressed."