Saudi Arabia's King Abdullah bin Abdulaziz is suffering from pneumonia and temporarily needed help to breath through a tube, but the procedure was successful and his condition is now stable, according to the royal court.
The statement came two days after Abdullah was admitted to the King Abdulaziz Medical City in Riyadh, according to state media, for tests after he suffered what one source described as breathing difficulties.
"It became apparent that there was a lung infection that required the insertion of a tube to aid with breathing on a temporary basis this evening," the royal court said in a statement carried by state news agency SPA on Friday.
The procedure had resulted in "stability and success".
A Saudi source familiar with the affairs of the royal family said Abdullah would most probably stay in the hospital for another week.
Markets keep a close eye on the health of the leader of the world's top oil producer, a country that also has influence over Muslims through its guardianship of Islam's holiest sites.
Abdullah, who took power in 2005 after the death of his half-brother Fahd, is thought to be 91, although official accounts are unclear. He has undergone surgery in the past few years related to a herniated disc.
Abdullah named his half-brother, Prince Salman, 13 years his junior, heir apparent in June 2012 after the death of Crown Prince Nayef bin Abdulaziz.
Earlier this year he appointed Prince Muqrin bin Abdulaziz as deputy crown prince, giving some assurance on Saudi Arabia's long-term succession process.