Frantic residents inundated the police with calls as up to 30 men – some armed – brawled in a Bellshill housing estate.
Most of those involved ran away on seeing police officers approach, but several arrests were made.
Kieran Leggat, 22, of Mansfield Road, Bellshill, and Graham Totten, 43, of Lanark Road, Carluke, admitted committing a breach of the peace by engaging in a fight in which weapons were used.
James Moody, 32, of Merry Street, Motherwell, had his not guilty plea to the charge accepted.
Hamilton Sheriff Court heard the fight happened in Rosevale Crescent on July 13.
Neil Thomson, prosecuting, said the trouble broke out about 7.50pm.
Police received a “significant” number of 999 calls from witnesses who claimed up to 30 males were involved.
Thomson said: “As police approached, individuals ran off in various directions.
“Totten was found nearby. He was bleeding from a head wound.
“Leggat was identified through mobile phone footage after someone filmed the incident.”
Leggat and unknown others were said to have battered Totten repeatedly on the head and body with a baseball bat or similar weapon to his severe injury.
But his not guilty plea to this charge was accepted.
Allegations that Leggat and Totten were armed with baseball bats and that Moody had unlawful possession of a hammer were dropped.
Leggat was jailed for five months, backdated to July 16 as he had been in custody since then.
Totten was ordered to carry out 160 hours of unpaid community work as a direct alternative to a prison.