The Crown says the 28-year-old accused g-suite manchester, whose name is suppressed, had just fled a bar in west Auckland where he punched a doorman in the early hours of November 18, 2011 when he clubbed Mr Dhaliwal over the head twice with a piece of wood.
Mr Dhaliwal's body was later found face down in a pool of blood at the Fulton Hogan depot in Sellwood Rd, near the junction with the Northwestern Motorway.
The accused is on trial in the High Court at Auckland charged with Mr Dhaliwal's murder and the assault of the doorman g-suite, Viki Alo.
But the accused's lawyer Lorraine Smith told the jury that her client did not strike Mr Dhaliwal.
She said the other three men - Alan Ulugia, Ganesh Vaidyaraman and a man whose name is suppressed - were members of a gang called CJKs and that her client just knew Ulugia through their rugby team.
"The defence case is that loyalties within that gang means when they were clear police knew those three were involved in the death, the obvious person to point the finger at was (the accused)," Ms Smith said.
Crown lawyer Yelena Yelavich said that after the quartet were refused entry into a Henderson nightclub because they lacked ID, the accused punched Mr Alo.
They then ran away, after which the accused threw a bottle at Mr Alo, Ms Yelavich said.
She said they then ran into the Fulton Hogan site to hide, at which point Mr Dhaliwal, g-suite cardinal manchester on his first day on the job, approached them and asked them to leave.
"Without warning, the accused approached and struck him with piece of wood," she said.
The trial before Justice Kit Toogood and a jury of nine women and three men is due to take three to four weeks.