An Indian diplomat was subjected to strip and cavity searches and treated like a "common criminal" by US authorities, it has been alleged.

Devyani Khobragade, India's deputy consul general in New York, was arrested last Thursday on charges that she lied in a visa application. The row over her treatment while in custody has led to a cooling of relations between the two countries, with India revoking some privileges for US diplomats in retaliation.

"I broke down many times as the indignities of repeated handcuffing, stripping and cavity searches, swabbing, in a holdup with common criminals and drug addicts were all being imposed upon me despite my incessant assertions of immunity," Khobragade wrote in an email published in Indian media on Wednesday.

The US secretary of state, John Kerry, has expressed his regret over what Indian officials called the "despicable and barbaric" treatment of their consul. State Department spokesman Marie Harf said that Kerry called India's national security adviser, Shivshankar Menon. She said Mr Kerry believed was important for foreign diplomats serving in the United States to be treated with respect, the Associated Press reported. Kerry, she added, expressed his hope the incident would not damage the close relationship betwee the US and India.

India's parliament has issued a statement condemning the United States over the affair.

Khobragade was arrested outside her daughter's Manhattan school over accusations of submitting false documents to obtain a work visa for her maid. Prosecutors allege she claimed to pay the maid $4,500 per month (£2,740), but that she actually paid her less than $3 per hour. Khobragade has pleaded not guilty and plans to challenge the arrest on grounds of diplomatic immunity.

The development is the latest in what has been reported as a long-running dispute between Khobragade and her maid. If convicted Khobragade faces a maximum sentence of 10 years for visa fraud and five years for making a false declaration.

Khobragade has now been transferred to India's mission to the United Nations, according to the Associated Press.

The case has sparked widespread outrage in India and damaged relations between the two nations, which have cooled in recent years despite a 2008 nuclear deal that was hailed as a high point.

The Indian government has demanded an apology. And, according to the Times of India, foreign minister Salman Khurshid told reporters in New Delhi: "We have put in motion what we believe would be an effective way of addressing the issue but also [put] in motion such steps that need to be taken to protect her dignity."

India also revoked diplomatic ID cards that brought certain privileges, demanded to know the salaries paid to Indian staff in US embassy households and withdrew some import licences.

In addition police removed the traffic barricades near the US embassy in New Delhi. The barriers were a safety measure but India said they clogged up traffic, the Associated Press reported.

The US Marshals Service confirmed it had strip-searched Khobragade and placed her in a cell with other female defendants. It described the measures as "standard arrestee intake procedures".

The White House spokesman Jay Carney said "this isolated episode is not indicative of the close and mutually respectful ties" between the US and India.

"We understand that this is a sensitive issue for many in India and we are looking into the intake procedures surrounding this arrest to ensure that all standard procedures were followed and that every opportunity for courtesy was extended," Carney said at a briefing on Wednesday.