NEW DELHI - Indian Prime Minister Narendra Modi has fired the country’s highest ranking diplomat and replaced her with India’s ambassador to the United States, a day after a successful visit by US President Barack Obama.

Modi’s appointment of Subrahmanyam Jaishankar as foreign secretary, the top bureaucrat at the foreign ministry, underscores the prime minister’s control over foreign affairs.

But his abrupt sacking of Sujatha Singh, the foreign secretary appointed by the previous Congress administration, was criticised by the Congress party. Since he swept to power last year, Modi has virtually taken over the reins of foreign policy, beginning with an unprecedented invitation to regional leaders to attend his inauguration and followed by high profile meetings with the leaders of United States, China, Japan and Australia.

Singh was asked to step down from the post, the government said late on Wednesday, with seven months to go before retirement. The last time the head of the elite foreign service was removed was in the late 1980s.

“Why have you replaced the head of the foreign service so unceremoniously,” Manish Tewari, a leader of the Congress party said. “The government needs to explain.”

During Singh’s tenure under the previous administration, India and the United States were embroiled in a diplomatic row over the arrest of a junior Indian diplomat in New York for an alleged visa fraud. Ties hit their lowest level in a decade.

Since then, Modi has moved rapidly to rebuild ties with Washington, putting behind his own embarrassment at being denied a visa for a decade for religious violence in the state he governed earlier.

He went on a state visit last September, building a relationship with Obama and then hosting him as the guest of honour at this week’s Republic Day Parade, the first US president to do so.

Jaishankar, credited with helping Modi turn around the relationship, said his job was to carry out the government’s priorities.

“A big responsibility. I am honoured that I have been assigned this responsibility,” he told reporters as he took charge. Jaishankar has previously been ambassador to China and Singapore.