A man has been sentenced to an indefinite term in prison after he stomped on another man's head in an unprovoked attack described by a judge as the worst he has ever come across.

Clifford Hughes, 30, from Elliott, attempted to murder another man at the Palmerston Shopping Centre last year by stomping on his head and upper torso 51 times.

Darwin's Supreme Court heard the attack occurred in broad daylight near a busy main road after Hughes had been drinking.

The victim was heavily intoxicated, asleep, and did nothing to provoke the attack.

"The manner shows the offender was well-coordinated and deliberate," said Justice Stephen Southwood, in sentencing Hughes on Thursday.

"The attack lasted 15 minutes and the offender stomped on the victim about 51 times."

The victim suffered numerous injuries, including a brain injury and fractured ribs.

Clifford Hughes, 30 has been sentenced to an indefinite term in prison for the attack in Palmerston in 2016 ( Supplied: Facebook )

"The nature of the attack was of an exceptional duration, involved a number of stomps... and involved a grossly disproportionate reaction of the offender," he said.

"In my time in this court, I can't think of a worse attack of such a kind."

The court heard CCTV which showed the attack was disturbing and emotive in nature.

"The doctor is of the opinion that if the victim was left untreated, it's likely he would have died," said Justice Southwood.

Hughes has a number of prior convictions for violent offences including a similar attack on his step-brother in 2004.

Attacker had 'strong desire to kill'

During Hughes' trial, psychiatrists told the court he didn't suffer from any mental illness and the attack was unprovoked.

Justice Southwood read out evidence from forensic psychiatrist Dr Kevin Smith, who said Hughes had narcissistic and anti-social personality traits.

"The offender embarked on the attack in an attempt to kill the victim," Dr Smith said.

"The attack was purposeful and sustained and the motivation was unclear."

Justice Southwood said Hughes attacked the victim once and then returned to continue it.

"He had a strong desire to kill and has a significant risk of similar behaviour in the future," he said.

"The victim was extremely vulnerable, older and more frail than the offender, asleep, highly intoxicated and after the beginning of the attack, he lost consciousness."

He said Hughes showed little remorse and displayed little to no insight as to what motivated the attack.

Hughes will be jailed indefinitely.

The prosecution believes this is only the sixth indefinite sentence imposed in the NT.

The maximum period served for attempted murder is life in prison.