The court had earlier been told that on December 5 Lynch and Marks had gone to the Kope Turf Bar. Marks was armed with a sawn-off shotgun and had the ammunition in his pocket.
They tried to rob the bar but patrons taking part in a pool tournament overwhelmed both men. Marks was held captive until police arrived and Marks was found a short time later.
When initially spoken to by police, Marks said the arrival of police at the scene had been like a rescue.
Marks was hit in the back of the head with a pool cue and a bar stool and also beaten by patrons while Lynch was on the receiving end of a violent struggle between himself and patrons.
Crown prosecutor Hayley Sheridan sought a six-year jail time as a start point but agreed time should be deducted because of the men's ages, their early guilty plea and the genuine remorse they had shown.
Judge Ingram said he believed Marks was capable of doing well in life after he was released from jail but he said he was not so sure about Lynch.
"I do believe both of you are remorseful for what you have done and your apologies are heartfelt," Judge Ingram said.
Lynch did not have any support in court while the large number of people supporting Marks told him as he left the courtoom that they loved him and to hold his head high.