SHAALVIM, Israel — For many Israelis, Tuesday was a day when the national became the personal, and the personal became communal. A day after their bodies were found, the three Israeli teenagers who were kidnapped and killed by suspected Palestinian militants in the West Bank were buried side by side, wrapped in Israeli flags, in a joint funeral that was intimate and attended by a multitude.

People from across this small but deeply divided country were united in grief. Many said they were also uplifted by a rare sense of commonality and inspired by the grace and self-restraint of the bereaved families, who have become public symbols.

In Jewish tradition, burial should take place as soon after death as possible. It took 18 days for searchers to find the missing teenagers, who officials say were fatally shot soon after they were abducted on the night of June 12. But in the religious world these youths came from, 18 represents the Hebrew word Chai, which means “alive,” in Gematria, an ancient system of numerology. The delay kindled a belief that in their deaths, they fulfilled a larger purpose of bringing together a fractious people.

The bodies were first brought from the forensic institute to their homes for individual ceremonies before the joint funeral.

Avraham Fraenkel, the father of Naftali Fraenkel, 16, one of the victims, who was also a United States citizen, eulogized his son before thousands who crowded the lawn outside the yeshiva of Shaalvim, a religious kibbutz that abuts Nof Ayalon, the quiet suburb where the family lives.

“God’s ways are mysterious, and I don’t know why you have left us so young,” he said, “but your death has led this entire nation forward, and there is some comfort.”

In Talmon, a settlement in the Israeli-occupied West Bank, Shir-El Shaar, a sister of Gilad Shaar, 16, Naftali’s school friend, said she had always imagined her brother growing up to be “a soldier in the army of the people of Israel.”

Naftali and Gilad were kidnapped along with Eyal Yifrach, 19, from the ultra-Orthodox town of Elad in central Israel while they were trying to hitch a ride home for the weekend from their West Bank yeshivas.

The Israeli Teenagers

The yeshiva students disappeared on June 12 while hitchhiking in the West Bank.

Eyal Yifrach, 19, was from Elad, an ultra-Orthodox town in central Israel.

Yitzhak Daboul, a friend of Eyal's family, told the Israeli news website Ynet that Eyal was “the father of all kids in the neighborhood,” who always did the right thing.

According to the Israeli newspaper Yedioth Ahronoth, Eyal, who had been in a pre-military program, began studying at the Shavei Hevron yeshiva less than two months after a friend who studied there died in car accident.

His mother, Rachel said Naftali, the second of seven children, loved playing basketball and the guitar, fought with his sisters and had a “cynical sense of humor.”

His maternal grandparents emigrated to Israel from New York in the 1950s, and he held joint Israeli and American citizenship.

According to Israel's Channel 10 Nana website, Naftali and Gilad Shaar recently returned from a two-day class trip in which they participated in a human-pyramid contest and won first prize.

Gilad Shaar, 16, is from the settlement of Talmon in the central West Bank.

He was a leader in Bnei Akiva, a popular religious youth movement, and his friends and family said he was an avid baker.

According to Ynet, Gilad’s great-uncle was killed fighting in the 1982 war with Lebanon, and though his family wanted Gilad to buried in a military cemetery, their request was denied.

Dr. Elisheva Ronen, 55, a pediatrician from the coastal city of Ashkelon, said she had come to Shaalvim “because this could have been my child, or anyone’s.”

After the individual ceremonies, three funeral processions made their way to the cemetery in Modiin, a nearby city halfway between Tel Aviv and Jerusalem. There, Prime Minister Benjamin Netanyahu, President Shimon Peres and the country’s chief rabbis eulogized the teenagers. The three fathers said Kaddish, the mourners’ prayer. The families then buried their dead privately.

Praising the families’ faith, determination and humanity, Mr. Netanyahu said, “An entire nation stood together and was reminded of who we are and why we are here.”

An error has occurred. Please try again later.

You are already subscribed to this email.

Throngs of Israelis who did not manage to crowd into the organized buses walked miles along closed roads in the scorching sun to reach the cemetery.

The last such national outpouring of emotion was probably the day in 2011 when Gilad Shalit, an Israeli soldier who spent five years in captivity in Gaza, was released in exchange for more than 1,000 Palestinian prisoners, many of them convicted of deadly terrorist attacks on Israelis. The general joy over the return of Sergeant Shalit was mixed with misgivings about the lopsided deal. This time, because the bodies were found without any bargaining, Israel has been spared any similar dilemma.

Yet there were early signs that the renewed sense of unity might be short lived. As the funerals were underway, hundreds of extreme-right-wing protesters gathered in Jerusalem demanding that the government avenge the deaths.

In Modiin, some of the tens of thousands who attended the joint funeral said they simply wanted to be part of the experience.

For others, the period since the kidnapping, which was filled with mass prayers and concern for the fate of the teenagers, is now imbued with greater meaning.

Joanne Yelenik, an Orthodox immigrant from the United States who now lives in Beit Shemesh, said: “Israel is a nation that clings to its divisions. For those 18 days, it was one people with one God and one land, clinging to its unity.”