President Barack Obama will shorten his trip to India and divert to Saudi Arabia, paying respects after the death of King Abdullah and meeting with the oil-rich nation’s new monarch, the White House said on Saturday.

The scheduling shift, which was announced just before Obama left Washington, underscores the desert kingdom’s pivotal role in US policy in the Middle East, including the military campaign against the Islamic State (Isis) militant group.

Saudi Arabia’s status as one of Washington’s most important Arab allies has at times appeared to trump US concerns about the terrorist funding that flows from the kingdom and about human-rights abuses.

White House spokesman Josh Earnest said on Saturday that Obama would meet on Tuesday with King Salman bin Abdul-Aziz Al Saud and other officials, to “offer his condolences on behalf of the American people”.

Obama’s pivot comes two weeks after the White House faced criticism for not sending a high-level representative to Paris for a peace rally in the wake of terrorist attacks there. The White House later said it was a mistake that someone with more stature than the US ambassador to France had not joined dozens of world leaders who marched arm in arm through the boulevards of Paris.

White House officials said Obama’s stop in Saudi Arabia was not influenced by the Paris mis-step, but it could keep similar criticism at bay as other world leaders head to Riyadh to offer condolences.

Obama’s willingness to visit Saudi Arabia, a country with ties to the terrorists behind the 9/11 attacks, could give critics a fresh reason to question why the president did not stand with Western allies in a symbolic show of defiance against violent extremism.

The schedule change meant that Obama, who was due to arrive in New Delhi on Sunday morning local time, would skip a visit to the Taj Mahal. The rest of Obama’s travel itinerary was to remain intact, including meetings with Prime Minister Narendra Modi, a summit with US and Indian business leaders, and his participation in the annual Republic Day festivities marking the enactment of India’s constitution.

Modi, who took office in May, surprised the White House by inviting Obama to attend the parade as his guest, the first time that honor has been bestowed on an American president.

Given Obama’s commitments in India, the White House originally had said Vice-President Joe Biden would travel to Saudi Arabia following the 90-year-old Abdullah’s death on Friday. Officials said that as plans for Biden’s trip came together, they realised that the window for the US delegation’s visit coincided with Obama’s departure from India, and they decided the president would make the four-hour flight from New Delhi to Riyadh.

In keeping with Islamic tradition, only Muslims attended Abdullah’s funeral on Friday. Other Western leaders were making plans to visit Saudi Arabia throughout the weekend.

Obama made an overnight visit to Saudi Arabia last March and met with Abdullah at his desert camp outside Riyadh. The king was in frail health at the time and appeared to be breathing with the help of an oxygen tank.

Saudi Arabia has been a stalwart US partner in the Middle East for decades. But there have been signs of fissures during Obama’s tenure, with the Saudi royal family growing frustrated with the White House’s cautious approach to the Syrian civil war and skeptical of the president’s diplomatic overtures to rival Iran. The US has also become less dependent on Saudi Arabia for oil, given production increases at home.

The fight against Isis in Iraq and Syria has brought about a more typical alignment between Washington and the Saudi government. Saudi Arabia is among five Arab nations that have assisted the US in conducting airstrikes against the militants.

US officials said Obama and the Saudis probably would discuss the deteriorating security situation in Yemen, where Saudi-backed President Abed Rabbo Mansour Hadi quit under pressure from Shiite rebels known as Houthis. The rebels have been accused of receiving backing from overwhelmingly Shia Iran, causing Saudi worries about being encircled by states influenced by Tehran.