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.