Sultan Qaboos of Oman flew home on Monday after spending more than eight months in Germany for medical treatment that was completely successful, state television reported.
Qaboos returned after "having completed medical treatment in Germany whose results were crowned as a total success," the television announced.
Footage showed the visibly frail 74-year-old walking unaided from a royal aircraft and then along a red carpet before being driven away.
In his last public address, Qaboos appeared on television in November to tell his nation that he would miss the 44th anniversary of his inauguration and national day, saying his treatment was giving "good results".
A diplomatic source in Muscat had said the sultan, who has ruled Oman since overthrowing his father in a bloodless 1970 coup, was suffering from colon cancer.
Scores of people took to social media networks to celebrate the return of Qaboos, who is the longest serving leader in the Middle East and the only one many Omanis have ever had.
"For eight months, Omanis have been praying that their leader would recover," said one post on Twitter using the Arabic hashtag "Good news: Qaboos has returned".
"This leader deserves all this love. He has devoted himself, his time and efforts to Oman," said another.
State television played celebratory music and replayed footage of the sultan's plane landing in Muscat.
When Qaboos took the reins of power, Oman was an isolated country living on the margins of the modern world with little or no infrastructure.
Qaboos has since transformed his Gulf sultanate -- which sits atop proven gas reserves of 660 million cubic metres (23.3 billion cubic feet) -- into a modern state.
Signup to our newsletter and follow us on Facebook and Twitter!
- Succession fears -
But his prolonged absence for treatment stirred fears over succession.
In October 2011, Qaboos, who has no children or brothers, amended the process of choosing his successor.
The sultan, whose closest relatives are cousins, appointed five top officials to a council that would be involved in confirming the new sultan in case of any royal family dispute.
Oman's population is estimated at around four million. Nearly 1.8 million of them are foreigners -- mostly Asians.
In 2011, the usually sleepy sultanate was caught up in the Arab Spring protest movement that touched much of the region.
Two civilians died in demonstrations demanding political and economic reforms, shaking the government and leading Qaboos to implement a series of reforms and to arrest scores of activists.
In an effort to placate protesters, Qaboos announced the creation of 50,000 new jobs, a monthly allowance for registered job seekers and a higher minimum wage for nationals working in the private sector.
He also reshuffled his cabinet.
The sultanate derives 79 percent of its revenues from oil, of which it produces only about one million barrels per day.
The non-OPEC member has projected a budget deficit this year of $6.47 billion, representing 8.0 percent of gross domestic product.
Unlike other Gulf monarchies, Oman enjoys good relations with Iran, which allowed it to play a key mediating role between the West and Tehran, mainly over Iran's disputed nuclear programme.