When Abil Malovski spotted his ex-wife selling flowers for Mother's Day with her new partner, he wanted to send her a message.
Several people, including his 10-year-old son, were gathered near the roadside flower stall when he opened fire on May 7, 2022.
Malovski got out of his car with a gun and chased his ex's partner, Steven Grant, shooting him at least five times.
"The message it sends to her is 'your life is not your own, you think you can leave me and hang out with some other guy? Well you can't'," prosecutor David Glynn told the Supreme Court on Tuesday.
"That's the message he sent and that's the message that was received."
Malovski was found guilty of attempted murder for the shooting in Melton, northwest of Melbourne, after a jury trial in October.
He smiled and laughed as he sat in a dock at the back of court on Tuesday for a pre-sentence hearing.
Malovski was acting out of anger, aggression, jealousy and a refusal to accept that his relationship had ended when he chased Mr Grant and fired shots, Justice Andrew Tinney said.
"Rather than try to move on with his life, he allowed things to overwhelm him to the point of trying to murder Mr Grant for no reason," the judge said.
"He was prepared to try and murder a man in front of a 10-year-old child, and in front of all those bystanders, who's to say what he'll do in five years, 10 years."
The prosecution urged Justice Tinney to impose a sentence to deter other men from acting similarly.
"That motivation of jealous control ... is a significant sentencing factor," Mr Glynn said.
"Deterring men such as Mr Malovski from actions that are designed to control, dominate or intimidate their ex-partners, who have the temerity to end their relationship."
He said Malovski often carried a loaded gun and told police "I love guns" when he was interviewed.
Mr Grant, who almost died from being shot, is paraplegic after bullets hit his spine.
His best friend Snjezana Peraica said she used to watch him deadlift 250kg at the gym with ease, but now he is a "broken man who is hurting physically, mentally and emotionally".
"My happy Mother's Day Sunday had turned into one of my darkest days, I felt broken, robbed and could not believe that someone could hurt such a beautiful human," she told the court, between tears.
"He went from being a fit, healthy, strong person, to an emotionless zombie at the mercy of God and the machines and medical staff keeping him alive."
Barrister Daniel Sala accepted Malovski faced a lengthy prison term but said this would allow his client time for "salutary thought" and rehabilitation.
"I'm just asking for an orthodox sentence," he said.
Malovski, who faces up to 25 years behind bars, was taken back to prison and will return to court in the coming weeks for sentence.
1800 RESPECT (1800 737 732)
Lifeline 13 11 14