By Anthony Colangelo, Nino Bucci and Robyn Grace

A 20-year-old man charged with preparing to carry out a New Year’s Eve terror attack at Melbourne’s Federation Square has appeared before court.

Ali appeared briefly in the dock on Tuesday afternoon, charged with one count of preparing to commit a terrorist attack and one of collecting documents to facilitate a terrorist attack.

Police allege he planned to arm himself with an automatic rifle and shoot as many people as he could on December 31 this year at Federation Square.

He faced Melbourne Magistrates Court, wearing the same check shirt and jeans he had on when he was arrested 24 hours earlier.

Ali spent several minutes in the dock but did not say anything before he was led back into custody. At one point he nodded at his lawyer, and then nodded to magistrate Simon Zebrowski before he was led away.

He did not apply for bail.

Mr Zebrowski said the accused man would be vulnerable in custody due to his age and appearance.

Ali is due to return to court on March 13.