(CNN)President Barack Obama defended Tuesday the need to maintain a close alliance with Saudi Arabia, a strategic U.S. ally with a poor human rights record, shortly before leaving India for a short visit to the Gulf Kingdom.
But even as the U.S. works closely with the Saudis on common strategic goals like counterterrorism, Obama said he and his administration continue to apply "steady, consistent pressure" on issues like human rights. Obama is headed to Saudi Arabia to meet the new King Salman and pay his respects following the death of King Abdullah last week.
"Sometimes we have to balance our need to speak to them about human rights issues with immediate concerns that we have in terms of countering terrorism or dealing with regional stability," Obama said in an interview with CNN's Fareed Zakaria in India on Tuesday.
During his visit Tuesday, Obama will make "paying respects," the bigger priority, avoiding directly answering a question from Zakaria on whether Obama would discuss with the Saudis the case of the political activist and blogger who was sentenced to 20 years in prison and 1,000 lashes for his activism.
RELATED: What to expect when Obama visits Saudi Arabia
And Obama was candid that U.S. pressure to advance human rights or encourage political reforms isn't always appreciated and "oftentimes that makes some of our allies uncomfortable. It makes them frustrated," he said.
"And you know, some of them listen and some don't," Obama said.
In the list of those who don't, Obama recalled the unraveling of the Egyptian dictatorship of Hosni Mubarak, the former president of Egypt who was overthrown in Egypt's 2011 revolution. Mubarak was one of the U.S.'s closest allies in the region during his three decades in office, thanks in large part to a strong security agreement and Mubarak's work to maintain peace with Israel.
Obama said that he warned Mubarak that the massive protests in Tahrir Square were not simply going to vanish, urging Mubarak to "get out in front of reform" and become "the father of the Egyptian democracy."
"I said, 'Mr. President, I don't think this is a genie that you can put back in the bottle,'" Obama recalled. "He said, 'Ah, Mr. President, you don't understand society here. This is all going to be fine. It'll blow over.' And it didn't," Obama said.
"But the trendline is one that I will sustain throughout the rest of my presidency and that is to make an argument to those friends and allies of ours that if they want a society that is going to be able to sustain itself in this age, then they're going to have to change how they do business," Obama said.