The accused, a cafeteria cleaner identified as AA, was sentenced by The Dubai Court of First Instance.
"The accused will be deported following the completion of his jail term," said presiding judge Maher Salama Al Mahdi.
The accused has denied the charge, Gulfnews reported.
Prosecutors said the defendant took advantage of the seven-year-old Algerian girl when her mother sent her with him to the cafeteria in December 2013 to get change for a meal she had ordered.
Also Read
"Fifteen minutes later my daughter returned and she was crying and petrified. When I asked her what happened, she claimed to me that he touched her and kissed her neck. I took my girl and went down to the cafeteria to confront the defendant. When he saw me, he seemed afraid and confused."
Today's ruling remains subject to appeal within 15 days.