A man who married a 14-year-old girl in Melbourne was told by authorities just a day before the ceremony that it was illegal for her to wed.

Mohammad Shakir, 35, repeatedly sobbed in the County Court on Wednesday after pleading guilty to marrying an underage person.

It is the first such prosecution in Australia and carries a maximum five years' jail.

Prosecutor Krista Breckweg said Shakir married the schoolgirl in an Islamic ceremony at a suburban Noble Park mosque in September 2016, giving her gold valued at $1480 as a dowry.

He knew the girl's age and was warned by child protection authorities against the wedding the day before the ceremony, Ms Breckweg said.

Read the complete original version of this item...