Updated

An Indian diplomat whose arrest and strip-search spurred an international flap had the case against her dismissed by a federal judge on Wednesday, but prosecutors suggested they might refile the charges stemming from claims she exploited her housekeeper.

For now, at least, Wednesday's ruling closes the case against Devyani Khobragade on the grounds of diplomatic immunity. The judge found Khobragade had broad immunity from prosecution when she was indicted on charges of fraudulently obtaining a work visa for her housekeeper and lying to the government about the maid's pay.

But the ruling left open the possibility prosecutors could bring a new indictment against her, and they "intend to proceed accordingly," said James Margolin, a spokesman for Manhattan U.S. Attorney Preet Bharara.

Khobragade's attorney, Daniel Arshack, said the former deputy general consul, now back in her homeland, was pleased by the ruling.

"She is heartened that the rule of law prevailed," he said, adding that a new indictment "might be viewed an aggressive act and one that (prosecutors) would be ill-advised to pursue."

Khobragade was arrested in December, with prosecutors saying she claimed she paid her Indian maid $4,500 per month to get the woman a visa but actually paid her less than the U.S. minimum wage. Prosecutors said the maid received less than $3 per hour for her work.

The arrest outside Khobragade's daughter's Manhattan school created outrage in India, particularly because of the strip-search. The U.S. Marshals said Khobragade was treated no differently than others who are arrested, and Bharara said Khobragade was arrested discreetly, given coffee and offered food while detained and afforded courtesies most Americans wouldn't get, such as being allowed to make phone calls for two hours to arrange child care and sort out personal matters.

Bharara, who was born in India but moved with his family to New Jersey, also said Khobragade wasn't handcuffed, restrained or arrested in front of her children.

Still, many in India saw the arrest as unnecessarily humiliating. Indian National Security Adviser Shivshankar Menon called the treatment "despicable and barbaric."

Khobragade had pleaded not guilty. Indian officials said the housekeeper had tried to blackmail the diplomat, which the housekeeper's advocates disputed.

The episode chilled U.S.-Indian relations, and India took such steps as removing concrete traffic barriers around the U.S. Embassy and revoking diplomats' ID cards. U.S. Secretary of State John Kerry called a top Indian official to express his regret over what happened.

After being indicted, Khobragade complied with a Department of State request to leave the U.S. The Indian government then asked Washington to withdraw a diplomat from the U.S. Embassy in New Delhi. The U.S. complied.

Wednesday's ruling centered on the complexities of different levels of legal protection afforded to diplomats. When Khobragade was arrested, U.S. officials said her status as a consular officer provided immunity limited to acts performed in the exercise of official functions. She disagreed, and then, on the day before her Jan. 9 indictment, she got a new appointment that conferred wider immunity.

Regardless of Khobragade's status when she was arrested, her later appointment gave her immunity when indicted and means the case must be dismissed, U.S. District Judge Shira Scheindlin wrote. And while Khobragade's immunity ended when she left the country, the indictment still could not stand, the judge wrote.

The judge said that mooted the question of whether the crimes Khobragade was accused of committing would have been considered "official acts" covered by the earlier, more limited immunity. If not, the judge wrote, "then there is currently no bar to a new indictment against Khobragade."

Since Khobragade does not have immunity now and courts have yet to settle what protection she had when arrested, that leaves a potential path for a new indictment, though any new case might be complicated by Khobragade's absence from the U.S.

She is in New Delhi, continuing to work for the government in foreign affairs, Arshack said.

"She's hugely frustrated" by her arrest and prosecution, he said.