President Barack Obama has defended the US government's willingness to cooperate closely with Saudi Arabia on national security issues despite increasing concerns over human rights abuses in the kingdom. 

Obama visited the Middle East nation on Tuesday to pay respects following the death of the country’s monarch, King Abdullah. 

Saudi Arabia's status as one of Washington's key allies has often trumped concerns over human rights in the country and "terrorist" funding that reportedly flows from the kingdom. 

The US president said that applying steady pressure over human rights during his visit has been most effective. 

"Sometimes we need to balance our need to speak to them about human rights issues with immediate concerns we have in terms of counterterrorism or dealing with regional stability," Obama said in a CNN interview that aired ahead of his arrival in Riyadh.

Obama has suggested that during his visit he would not be raising concerns regarding Saudi Arabia's flogging of blogger Raif Badawi, who was convicted of insulting Islam on an online forum for which he was sentenced to 10 years in prison and 1,000 lashes. 

Badawi is due to undergo 50 lashes every week after Friday prayers, which will continue for 20 weeks until his punishment is complete.

The United States had previously appealed to Saudi Arabia to cancel the sentence.

Despite their differences, the two nations have worked closely on regional issues. Most recently, the kingdom joined the US in launching airstrikes against the Islamic State in Iraq and the Levant (ISIL).

Obama has acknowledged that US willingness to pursue closer ties with Saudi Arabia in light of the kingdom's human rights record has often made American allies uncomfortable. 

But he has vowed to continue ties with Saudi Arabia, saying: "The trend-line is one that I will sustain throughout the rest of my presidency."

Source: AP