His lawyer Shrikant Shivade said he may approach a sessions court on Friday to seek bail for the actor. Ahuja will spend the night at the prison in Arthur Road, central Mumbai.
Shivade felt Ahuja does not need to be in police custody because all the tests have been conducted in the case.
The prosecution sought police custody of the actor for three more days as the police awaited his and the victim's medical and forensic reports.
The actor complained he was being handcuffed before he was produced in court and that it was hurting him. The magistrate asked the police not to handcuff Ahuja.
Ahuja appeared happy to see his wife Anupam in court and whispered to her, 'things will be fine.'
"The accused's urine and blood samples have been taken. We need to probe if he was under the influence of drugs or alcohol at the time of the incident," the police said.
The police, which had earlier stated that the maid was 18 years old, now say she is 20, on the basis of a school certificate obtained from Roha in Raigad district, from where she hails.
Additional inputs: Nithya Ramani