(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.

Read More