Salim Mehajer will spend almost a year behind bars after a Sydney magistrate convicted him of electoral fraud, six years after he rigged a local government election that catapulted him into public office.

It is the first major sentence to be handed to the 32-year-old former Auburn deputy mayor, who has spent the past six months in and out of prison after being refused bail or breaching bail conditions relating to other criminal charges.

On Friday, Downing Centre Local Court magistrate Beverley Schurr convicted the property developer of 77 counts of electoral fraud and sentenced him to a maximum of 21 months behind bars with a non-parole period of 11 months. He has lodged an appeal.

The offences struck at the heart of the democratic process and the integrity of the electoral roll, Ms Schurr said.