06/06/2017 2:30 PM AEST | Updated 06/06/2017 2:30 PM AEST

A Violent Past And A Violent Death: Who Was Yacqub Khayre?

The 29-year-old Somali-born Australian had a long criminal history.

Melbourne gunman Yacqub Khayre was well known to police and had a long and violent criminal past, but police say they had little reason to expect a terror attack was imminent.

The 29-year-old was out on parole on Monday when he shot dead an apartment attendant, took a sex worker hostage and shot three police officers in Melbourne, in what police are treating as a terror attack.

Channel 7 News
Yacqub Khayre outside court on December 23, 2010 after being acquitted of helping plot a terror attack on the Holsworthy army base.

It is not the first time Khayre has been suspected of terrorist ties, but he also has a history of drug use, armed burglaries and violent assaults. Khayre came to Australia with his grandparents as a three-year-old refugee after fleeing violence in Somalia and spending time in a Kenyan refugee camp.

Khayre's uncle, Ibrahim -- who helped bring the young Yacqub and his family from Somali to Australia in 1991 -- said the boy grew up respectable and disciplined, but lost his way after his grandfather, who raised him, died.

In a 2009 interview with Fairfax Media following his nephew's arrest over a planned terror attack, Ibrahim said Yacqub had fallen in with boys who were a "bad influence" while in Year 12 and he had lost contact with the boy after turning him in to police for stealing his car.

By the time he was 17, he had been charged for over 40 crimes, including multiple burglaries, assault, methamphetamine possession, failing to answer bail and resisting arrest. He has served jail time for stabbing a man in the leg on a train while attempting to steal his phone and money and for illegally possessing firearms.

You will become even more isolated than you are now, institutionalised, and at increasingly high risk of re-offending". -- Judge Hampel, 2012

A source in the Muslim community told The Age that Khayre's Muslim faith was "on and off" and that he had "serious mental health issues" and was addicted to the drug ice.

In 2009, Khayre was among five men charged with plotting a large-scale terror attack on the Holsworthy Army base in Sydney.

During the trial, the court heard that the group -- who allegedly had links to the Somali terrorist group al Shabaab -- planned to obtain automatic weapons, enter the army barracks and shoot as many people as possible until they were killed or arrested.

It was alleged that Khayre had travelled to Somalia with co-accused to undertake military training with al Shabaab and obtain a fatwa (permission) for the Holsworthy attack.

Khayre was remanded in a high-security prison for 16 months while the trial was held, but was acquitted and released just before Christmas in 2010. Three of his co-accused were found guilty of plotting the attack.

When he shot a man dead and took a woman hostage on Monday, he was out on parole after serving more than four years for assaulting a woman while robbing her house in an ice-fuelled attack.

Fairfax Media
Police shot dead Yacqub Khayre when he fired on police in the Melbourne suburb of Brighton on Monday night.

In April 2012, armed with a flick knife and under the influence of drugs, Khayre was robbing a house when he was accosted by its occupants.

He punched the three homeowners and head-butted one of them, before they wrestled him to the ground and held him until police arrived, the ABC reports.

Khayre pleaded guilty to attempted robbery and intent to recklessly cause injury and was sentenced to prison for five years and six months, with a non-parole period of three years.

In handing down the sentence, Judge Felicity Hampel said his prospects for rehabilitation were grim.

"If you do not stop abusing drugs, you have limited prospects for rehabilitation," Judge Hampel said.

"It would appear that each time you have been released from detention or custody, you have rapidly turned back to drug abuse, and nothing has been put to me to indicate that you demonstrate any will or commitment to address it."

The judge warned "you will become even more isolated than you are now, institutionalised, and at increasingly high risk of re-offending".

He had had his sentence extended a number of times for bad behaviour and for additional arson charges committed while in prison.

In a press conference on Tuesday morning, police said it was "a possibility" that Khayre had shot the apartment employee and taken a sex worker hostage to lure police into a deadly stand-off as part of a terrorist attack -- but they'd found no direct links between Khayre and the terrorist group Islamic State.

"We're aware of, online, (ISIS) having claimed responsibility, but then they always tend to jump up and claim responsibility every time something happens," Victoria Police Commissioner Graham Ashton said.

"There is nothing that we've found thus far that would suggest to us that this was anything that was planned or done in concert with others. We believe at this stage from the information we have that he was acting alone and there isn't a sort of ongoing threat in relation to any plot or anything around this individual," the Police Commissioner said.