Updated

The American ambassador to India said she has resigned and will retire before the end of May, ending a two-year tenure after the strip-search of an Indian diplomat in New York City badly damaged U.S.-India ties.

In a posting on the U.S. Embassy website Monday, Ambassador Nancy Powell gave no reason for her decision but said she had planned it for some time.

The resignation comes at an awkward time, with India's national elections just one week away. It also comes as the two countries are still trying to mend ties following the diplomatic spat over the arrest of diplomat Devyani Khobragade in New York.

In Washington, State Department Deputy Spokeswoman Marie Harf denied Powell's decision had anything to do with tensions between the two countries.

"It is in no way related to any tension, any recent situations," Harf said.

India and the United States have become close allies over the past decade, following many years of Cold War distrust. But the ties unraveled in December, when Khobragade, India's deputy consul general in New York, was arrested in Manhattan and strip-searched.

Khobragade was accused of lying on visa forms so she could bring her maid to the U.S., paying her a pittance while forcing her to work long hours. Khobragade has denied any wrongdoing and she has since returned to India.

The affair laid bare a string of cultural taboos in India, where strip-searching a member of the educated elite would be unthinkable.

The U.S. Marshals said Khobragade was treated no differently than others who are arrested. But the case caused an international furor, with Indian officials calling her treatment barbaric. India unleashed a steady stream of retaliatory measures against U.S. diplomats, such as removing concrete barriers around the U.S. Embassy, saying they obstructed traffic, and revoking diplomats' ID cards.

Powell took up her posting in New Delhi two years ago. Prior to President Barack Obama nominating her as ambassador to India, she was director-general of the foreign service and director of human resources.

She is ending a 37-year career that has included postings as U.S. ambassador to Uganda, Ghana, Pakistan, Nepal and India.

Her stint in Pakistan between 2002 and 2004 came as the United States was first seeking Islamabad's cooperation in fighting Al Qaeda and the Taliban after the Sept. 11, 2001, attacks.