Ambarīṣa had two duties and not enough time to perform both in the ordinary way.
He had observed a fast with care, and the proper Dvādaśī period for ending it was nearly over.
Then the sage Durvāsā arrived as a guest.
Ambarīṣa welcomed him and invited him to eat.
Durvāsā accepted, but first went to the Yamunā to bathe and perform his observance.
He did not return before the breaking time began to disappear.
If Ambarīṣa ate, he would eat before the guest he had invited.
If he did nothing, the prescribed time for completing his own vow would pass.
The king consulted learned brāhmaṇas.
He settled on the smallest action he could take: water.
The source gives the reasoning directly. Drinking water could be treated as eating and also as not eating. Ambarīṣa could mark the fast's completion without sitting down to a meal before Durvāsā.
He drank a little water.
Then he waited.
Durvāsā returned and understood what had happened.
He was furious.
From his point of view, the host had broken the fast before feeding the guest.
His anger became an attack. Durvāsā tore out a lock of hair and created a fiery being to destroy the king.
Ambarīṣa did not send a weapon after him.
The Sudarśana discus intervened, destroyed the attacker and then turned toward Durvāsā.
Now the guest who had arrived angry became the person fleeing for safety.
Durvāsā ran through the worlds seeking someone who could stop the discus.
He appealed in the great divine realms, but the pursuit did not end.
At last he learned that the path out of the danger led back to the person he had tried to harm.
Durvāsā returned to Ambarīṣa and fell at his feet.
Ambarīṣa did not celebrate the reversal.
The Bhāgavata says he was embarrassed to see the great sage bowing before him.
He prayed to Sudarśana for Durvāsā's safety.
The danger ended.
Then the story reveals how long the host had been waiting.
A full year had passed.
During that year, while Durvāsā travelled under pursuit, Ambarīṣa had not gone ahead and eaten the meal without him. The text says the king maintained himself on water while waiting for the sage's return.
When Durvāsā was finally safe, Ambarīṣa fed him well.
Only after his guest had eaten did the king himself eat.
That last detail changes the shape of the episode.
It would be easy to tell this as a story in which a careful king is proven right and an angry sage is proven wrong.
But Ambarīṣa does not use vindication as permission to stop being a host.
His first problem was how to honour two obligations at once. His last action shows that the obligation to Durvāsā never vanished from his mind, even after the attack and the pursuit.
He holds his ground without turning the other person's humiliation into a victory scene.
Durvāsā's flight is long because each place he reaches points him onward. He goes to Brahmā and to Śiva, and finally to Nārāyaṇa, but none simply cancels what has happened. He is directed back toward Ambarīṣa, the person against whom the offence was committed.
That return is important to the structure. The same sage who had treated the sip of water as an intolerable insult now has to place his safety in the hands of the host he attacked. Ambarīṣa's response is not to demand an apology scene for his own satisfaction; he immediately turns to prayer for Durvāsā's protection.
After eating, Durvāsā praises the king and departs satisfied. Only then does Ambarīṣa take food. The meal that was delayed at the beginning of the story is finally completed after an entire year, with the guest still fed first.
The waiting ends only when hospitality can finally be completed without fear.
Ambarīṣa's restraint lasts longer than the quarrel: he is still waiting to feed his guest when the guest finally comes home.