A teenager who purchased several bayonets and knives from a Sydney gun shop has been jailed for 12 years for plotting an "imminent" terror attack inspired by Islamic State.

Key points: The teenager claimed he bought weapons for hunting and camping

The teenager claimed he bought weapons for hunting and camping Justice Geoffrey Bellow said the teenager "regarded the government as evil"

Justice Geoffrey Bellow said the teenager "regarded the government as evil" He will be eligible for parole in 2028

The 18-year-old, who cannot be named for legal reasons, sat quietly as he was sentenced to a maximum 16 years behind bars.

He waved to his father as he was led from the court.

The man was 16 years old when he was arrested at a Bankstown prayer hall in 2016 after purchasing bayonets and knives from a nearby gun shop.

During sentencing, Justice Geoffrey Bellew told the Parramatta Supreme Court he believed the offender was arrested while planning an imminent act of terror.

"It reflects a deep and unstinting motivation to act upon and put into specific effect the irrational, immoral and heinous advice propounded in extremist propaganda issued by Islamic State," he said.

Justice Bellew rejected the offender's claims that he purchased the weapons because of an interest in hunting and camping.

The court heard the teenager told the gun shop attendant he was planning to go "pig hunting".

During his arrest, he repeatedly called the police "pigs", Justice Bellew said.

During his trial, the court was told that the boy had yelled at police "You're all pigs, you will all die in the hellfire at the hands of Allah, you will be slaughtered" during his arrest.

Justice Bellew said the offender "regarded the government as evil".

"I am satisfied that the offender was ready, willing and able to carry out a terrorist attack.

"The evidence when viewed as a whole establishes a clear plan to use the knives to inflict death or serious injury."

'Forethought, intelligence and guile'

The court heard the man was raised in a household supportive of Islamic State ideology, but the judge rejected claims by the offender at trial that he was influenced or pressured to support this ideology by others.

"I am satisfied the offender's return to extremist ideology was a product of his own volition, unencumbered by the influence of others," Justice Bellew said.

"He purchased weapons he then secreted, he carried camouflage gear, he took steps to ensure he could not be traced.

"He was arrested in an area where he expected there would be appropriate targets.

"It reflects a considerable degree of forethought, intelligence and guile."

He will be eligible for parole in October 2028.