Just as there were two foremost disciples in the order of monks, namely Sariputta and Moggallana, likewise the Buddha named two women as foremost amongst nuns, namely Uppalavanna and Khema.
The name Khema means well-settled or composed or security and is a synonym for Nibbana. The nun Khema belonged to a royal family from the land of Magadha. When she was of marriageable age, she became one of the chief consorts of King Bimbisara. As beautiful as her appearance was, equally beautiful was her life as the wife of an Indian Maharaja.
When she heard about the Buddha from her husband, she became interested, but she had a certain reluctance to become involved with his teaching. She felt that the teaching would run counter to her life of sense-pleasures and indulgences. The king, however, knew how he could influence her to listen to the teaching. He described at length the harmony, the peace and beauty of the monastery in the Bamboo Grove, where the Buddha stayed frequently. Because she loved beauty, harmony and peace, she was persuaded to visit there.
Decked out in royal splendor with silk and sandalwood, she went to the monastery. The Exalted One spoke to her and explained the law of impermanence of all conditioned beauty to her. She penetrated this sermon fully and still dressed in royal garments, she attained to enlightenment. Just like the monk, Mahakappina — a former king — she likewise became liberated through the power of the Buddha's words while still dressed in the garments of the laity. With her husband's permission she joined the Order of Nuns. Such an attainment, almost like lightning, is only possible however where the seed of wisdom has long been ripening and virtue is fully matured.
An ordinary person, hearing Khema's story, only sees the wonder of the present happening. A Buddha can see beyond this and knows that this woman did not come to full liberation accidentally. It came about like this: In former times when a Buddha appeared in the world, then Khema in those past lives also appeared near him, or so it has been recounted. Due to her inner attraction towards the highest Truth, she always came to birth wherever the bearer and proclaimer of such Truth lived. It is said that already innumerable ages ago she had sold her beautiful hair to give alms to the Buddha Padumuttara. During the time of the Buddha Vipassi, ninety-one eons ago, she had been a teacher of Dhamma. Further it is told, that during the three Buddhas of our happy eon, which were previous to our Buddha Gautama, she was a lay disciple and gained happiness through building monasteries for the Sangha.
While most beings mill around heaven or hell realms during the life-time of a Buddha, Khema always tried to be near the source of wisdom. When there was no Buddha appearing in the world, she would be reborn at the time of Pacceka-Buddhas or Bodhisattas. In one birth she was the wife of the Bodhisatta, who always exhorted his peaceful family like this:
to what you have got, give alms;
One day Khema's only son in this life was suddenly killed by the bite of a poisonous snake, yet she was able to keep total equanimity:
he hither came, without leave departed, too;
Another time — so it is told — she was she daughter-in-law of the Bodhisatta (J 397), many times a great Empress who dreamt about receiving teaching from the Bodhisatta and then actually was taught by him (J 501,502,534). It is further recounted that as a Queen she was always the wife of he who was later Sariputta, who said about her:
status is the wife,
This husband in former lives was a righteous king, who upheld the ten royal virtues: Generosity, morality, renunciation, truthfulness, gentleness, patience, amity, harmlessness, humility, justice. Because of these virtues the king lived in happiness and bliss. Khema, too, lived in accordance with these precepts. (J 534)
Only because Khema had already purified her heart and perfected it in these virtues, in many past lives she was now mature enough and had such pure and tranquil emotions, that she could accept the ultimate Truth in the twinkling of an eye.The Buddha praised her as the nun foremost in wisdom.