India's Deputy Consul General in New York, Devyani Khobragade, attends a Rutgers University event at India's Consulate General in New York, June 19, 2013. REUTERS/Mohammed Jaffer/SnapsIndia NEW YORK/WASHINGTON (Reuters) - An Indian diplomat whose arrest and strip-search caused a major rift in U.S.-Indian ties was effectively expelled from the United States on Thursday as part of a deal in which she was granted diplomatic immunity from charges of visa fraud and lying about underpaying her nanny.

Devyani Khobragade, who was deputy consul-general in New York, was arrested December 12 and charged with one count of visa fraud and another of making false statements about how much she paid her housekeeper.

Her arrest set off protests in India amid disclosures that she was strip-searched on the day of her arrest. The dispute soured the broader U.S.-India bilateral relationship, leading to sanctions against American diplomats in New Delhi and the postponement of visits to India by senior U.S. officials and another by a U.S. business delegation.

Khobragade's lawyer Daniel Arshack said she planned to return to India on Thursday night and would leave with her head "held high."

"She knows she has done no wrong and she looks forward to assuring that the truth is known," he said in a statement.

The planned departure came the same day a grand jury in New York indicted her for visa fraud and making false statements. She had been engaged in plea talks prior to the indictment, prosecutors said in a January 6 court filing.

While both New Delhi and Washington stressed the importance of their bilateral relationship during the crisis, it took weeks of complex wrangling to find a workable solution both sides could live with.

Documents and statements from U.S. officials reveal a dizzying 24 hours in which the State Department granted Khobragade diplomatic immunity, unsuccessfully asked India to waive that immunity and ordered her to leave the country immediately.

According to documents provided by Arshack, the U.S. mission sent a letter to Khobragade on Wednesday granting her diplomatic status as of 5.47 p.m. (2147 GMT) that day.

INDIA INCENSED

On Thursday, the Indian mission to the United Nations rejected the State Department's request that her immunity be waived. Then in a diplomatic note, the U.S. mission requested Khobragade's immediate departure from the United States and said it would take steps to prevent her from obtaining a visa in the future. It also said Khobragade, 39, who is married to an American, risked arrest if she tried to return.

"Upon her departure a warrant may be issued for her arrest and should she seek to enter the United States she could be arrested," the note said.

There was no immediate comment from the Indian Embassy in Washington or its mission to the United Nations.

India was incensed by the treatment of Khobragade and curtailed privileges offered to U.S. diplomats in New Delhi. On Wednesday it ordered the U.S. Embassy to close a club for expatriate Americans there.

Also on Wednesday, U.S. Energy Secretary Ernest Moniz postponed a visit to India scheduled for next week. This move came days after U.S. Assistant Secretary of State for South AsiaNisha Desai Biswal delayed her first visit to the country to avoid the trip becoming embroiled in the dispute.

The arresting authority, the U.S. Marshals Service, characterized the strip search as a routine procedure imposed on any new arrestee.

As well as this treatment of Khobragade, India was angered that the United States took it upon itself to fly the nanny's family out of India. The prosecuting attorney, Preet Bharara of Manhattan, an ethnic Indian, said attempts were made in India to "silence" Richard and compel her to return home.

While much of the focus has been on Khobragade, the cause of the nanny, Sangeeta Richard, has been taken up by a non-government organization called Safe Horizon, which campaigns for victims of abuse.

It said that although Richard's legal presence in the United States was tied to her employment, she had been granted temporary permission to remain while she cooperates with law enforcement as a victim of human trafficking.

It said Richard was likely to apply for a special "T-1" visa reserved for trafficking victims. Such a visa would be valid for up to four years and allow her to work in the United States. It can also lead to lawful permanent residence, according to the website of U.S. Immigration and Customs Enforcement.

UNDERLYING PROBLEMS

Khobragade's departure would remove the focus of current friction between New Delhi and Washington, but it is unclear how long it will take the anger to subside in the run-up to national elections in India in May. Also, the continued presence of Richard in the United States could prove an irritant.

The case has exposed underlying problems in a bilateral relationship that has failed to live up to its billing by President Barack Obama in 2010 as "a defining partnership for the 21st Century."

Critics accuse Obama of failing to pay sufficient attention to ties with a country viewed as a key strategic counterbalance to China and as an engine to boost the U.S. economy, while American hopes of building a more robust business relationship with India have run into bureaucratic hurdles.

Frustration has grown among the U.S. corporate lobby. Indian sourcing rules for retail,information technology, medicine and clean energy products are contentious and U.S. firms complain about "unfair" imports from India of everything from shrimp to steel pipes. In June, more than 170 U.S. lawmakers signed a letter to Obama about Indian policies they said threatened U.S. jobs.

Daniel Markey, senior fellow for India, Pakistan and South Asia at the Council on Foreign Relations, said the Khobragade case made it appear the Obama administration had taken its eye off the ball on the relationship with India.

"The question is why this wasn't managed in a more sophisticated or subtle way, because things can be managed more effectively. This was always going to be an issue, but it could have been resolved more rapidly with less fanfare."

Speaking at a seminar on Thursday, Ron Somers, president of the U.S.-India Business Council blamed "bumbling on both sides" for the Khobragade affair.

"We have to do some thinking on this side as to what has there been in the way of frustration that allowed this incident to provoke and spill over as it has," he said.

"We really need now to be building trust and taking an introspective look at whether we really mean what we say when we talk about strategic partnership and how do we get there."

(Reporting by Nate Raymond, Joseph Ax and Chris Francescani in New York, David Brunnstrom in Washington, and Louis Charbonneau at the United Nations; Editing by Clive McKeef and Eric Walsh)