The operation, to correct "a ligamentary slackening in the upper back" of the elderly monarch, ended at dawn on Sunday, said a statement quoted by the official SPA news agency.
The sovereign had already undergone a similar operation in October last year.
In November 2010 he was operated on in New York for a slipped disc complicated by a blood clot that put pressure on his spine, and underwent a further operation the following month before convalescing for a month in Morocco.
The king's age and his frequent hospitalisations regularly feed rumours about the future leadership of the kingdom, a key player in the Middle East and the world's top oil exporter.
The king's half-brother Prince Salman, 76, was named crown prince in June after the death of Prince Nayef bin Abdul Aziz.