There once reigned in Mithilā a king, named Suruci. He had a son also called Suruci-kumāra, who studied at Takkasilā, where Prince Brahmadatta of Benares was his fellow student. They became great friends, and agreed to bring about an alliance between the two royal houses. Suruci came to the throne of Mithilā and had a son called after himself. Brahmadatta became king of Benares and had a daughter, Sumedhā. A marriage was arranged between Suruci and Sumedhā, but Brahmadatta agreed to the alliance only on condition that Sumedhā should be Suruci's only wife. Suruci accepted this condition, but, though Sumedhā lived in the palace for ten thousand years, she had no child. The people clamoured for an heir, but Suruci refused to take another queen, though Sumedhā herself obtained for him many thousands of women for his harem, sixteen thousand in all. Forty thousand years thus passed, but no child was born in the palace.
Then Sumedhā vowed an Act of Truth; Sakka's throne was heated, and he asked the god Nalakāra to be born as Sumedhā's son. Nalakāra reluctantly agreed. Then Sakka went to the king's park disguised as a sage and offered to give any woman who was virtuous a son. "If thou seek virtue, seek Sumedhā," they said. He then went to the palace, and having made Sumedhā declare to him her virtue, he revealed his identity and promised her a son. In due course a son was born - Mahāpanāda. He grew up amid great splendour, and, when he was sixteen, the king built for him a grand palace.
It is said that Sakka sent Vissakamma as mason to help with the building. When the palace was completed, three ceremonies were held on the same day: the dedication of the palace, Mahāpanāda's coronation and his marriage. The festival lasted for seven years, and the people began to grumble; but the king would not bring the festival to an end, for all this time Mahāpanāda had not once laughed, and the king said the feast could not end till he was made to laugh. Various people came to amuse him, among them two jugglers, Bhandukanna and Pandukanna; but it was not till Sakka sent a divine dancer to dance the "Half body" dance, in which one half of the body danced while the rest stood still, that Mahāpanāda smiled.
The story was related on the occasion on which the Buddha gave Visākhā eight boons. One night there was a great storm, and the Buddha asked the monks to drench themselves in the rain as that would be the last great rain storm in his time. Together with them the Buddha appeared at Visākhā's house, but as soon as they arrived on the threshold they were quite dry.
Bhaddaji is identified with Mahāpanāda, Visākhā with Sumedhā, Ananda with Vissakamma, and the Bodhisatta, was Sakka. J.iv.314-25; cf. DA.iii.856f.; and J.ii.334.