The legal battle over an Indian diplomat whose recent arrest in New York caused an uproar in her home country took an unusual turn on Thursday when she was indicted by a federal grand jury in Manhattan but was then allowed to leave the United States.

The envoy, Devyani Khobragade, was granted diplomatic immunity on Wednesday by the State Department, which then asked India to waive the immunity so that she could be prosecuted. That request was refused.

The State Department then told her to leave the country. The diplomat left by plane for India on Thursday night, her lawyer said.

Ms. Khobragade, 39, was arrested on Dec. 12 on a criminal complaint charging her with visa fraud and making false statements in connection with her treatment of a domestic worker, Sangeeta Richard, who prosecutors said had been overworked and unpaid by Ms. Khobragade.