Israel allows the very sick to visit Israeli hospitals, for chemotherapy or dialysis or surgery. It sometimes permits mourners to attend funerals of close relatives. Most of the permissions go to Gazan traders, who import Israeli goods into the besieged enclave.

Two years ago, Israeli authorities created a new category: pilgrims. A few hundred older Palestinians may now exit the coastal strip on Fridays and take the 90-minute bus trip to Jerusalem to pray at al-Aqsa Mosque, the third-holiest site in Islam.

This is the story of one group of seniors who made the trip aboard Bus No. 2.

Although Israel is visible from the rooftops of Gaza, the strip is surrounded by fencing and watchtowers. Most of the pilgrims clambering aboard had not been to Israel in years.

“So green,” an old farmer said as the bus rolled away from the Erez crossing into the fertile lowlands just east of the ancient seaport of Ashkelon.

A retired Palestinian construction worker marveled at all the bridges.

The seniors applauded the wide Israeli highways.

“No potholes,” whispered one.

For the 220 Palestinians on a recent Friday, this journey from Gaza to Jerusalem was short but extraordinary — a kind of time travel.

Asked when they had last crossed into the Jewish state, the pilgrims gave their answers: 2004 or 1986 or 1974.

Marwa Shurab remembered she last visited Jerusalem on a high school trip more than 40 years ago. She is now 58 and a grandmother.

Faisal and Huda Buhasi rest on a bus after their trip to the mosque. A busload of Palestinians from the Gaza Strip were allowed to travel from the coastal enclave to Jerusalem on Sept. 23. (William Booth/The Washington Post)

“I was a young girl then,” Shurab said, looking out the window at Israel — and her own reflection.

“There are a lot more trees now,” she said.

One of her seatmates asked what had happened to all the hills. She was told to be patient — she would see them in a few more miles.

Their trip began a few hours before dawn. At the border, they first passed through a checkpoint manned by the Islamist militant movement Hamas, which has ruled the Gaza Strip since 2007 and whose militia has fought three wars with Israel since then.

Hamas is the reason Israel maintains a partial trade and travel blockade of Gaza. The United States and Israel consider Hamas a terrorist organization. Materials such as cement and pipes, imported to Gaza for civilian use, are routinely appropriated by Hamas to build tunnels and rockets, Israel says. Gaza’s 1.8 million residents are also a security threat, as they can act as couriers or smugglers for Hamas, the authorities say — although the Palestinians say that this is not true, that the restrictions are really just a kind of punishment.

After the Hamas checkpoint, the pilgrims passed a second checkpoint manned by the Palestinian Authority, bitter rival of Hamas. They were told they could not bring food or water into Israel. On the Israeli side, their bags went through X-ray machines, their bodies were scanned, permits reviewed.

When they were finally settled inside Bus No. 2, one of the Palestinian organizers explained the rules. The trip would take a little more than an hour each way. They would arrive near the Lions’ Gate in the Old City and have to walk a few hundred yards. They were to visit the place known to Muslims as Haram al-Sharif, or the Noble Sanctuary, the raised esplanade that harbors al-Aqsa Mosque and the golden Dome of the Rock. They would be allowed to take a short stroll through the Old City but would not be permitted to venture further. They would have to be back on the bus by 2 p.m. Or else.

“If you miss the bus, a taxi back to Erez crossing costs 350 shekels,” they were warned, almost $100. “If you don’t return, your names would be put on a blacklist.”

Then the guide collected their identification papers. These would be returned when they got back on the bus.

Since 2014, there have been 18,500 crossings from Gaza into Israel for the Friday trip to Jerusalem, according to the Israeli military. The permits are limited to men older than 60 and women older than 55. A permit and the bus ride cost 65 shekels, about $17.

In the past two years, Israeli authorities said 97 Gaza residents who received day permits to pray in Jerusalem did not return as required. Most eventually found their way back to Gaza, but enough people skipped the return that Israeli security officials have canceled some Friday trips.

On the recent bus ride, one woman did not want to surrender her identification card. “I’m not coming back,” she declared. “For 30 years, I haven’t seen my relatives. I don’t even know what they look like anymore.” The Palestinian territories of the West Bank and Gaza are just 50 miles apart, but because of the wars, the ascension of Hamas and two violent uprisings in the 1980s and early 2000s, ­Israel has restricted movement between the two regions.

The Palestinian guide was patient: “Madam, you have to give me your ID card. You think you’re the only one who wants to stay? What you do is up to you. But I recommend you get back on the bus.”

She surrendered her identification.

For most on the bus, it is a religious pilgrimage — they would have little time to shop or meet relatives for lunch. But it offers a few hours of respite from the claustrophobia and dysfunction of the Gaza Strip, where 70 percent of the population relies on humanitarian aid and where unemployment rates are among the highest in the world.

Asked why she was traveling, Huda Buhasi, 60, did not dwell on the long-running conflict between Israelis and Palestinians.

“We are old and we should pray at the mosque one more time before we die,” she said.

The Palestinian pilgrims were by turns impressed, envious, dismayed and happy about what they saw.

“It is so beautiful,” said Ibrahim Marouf, 90, a retired farmer who walked with a cane.

Then he added, “This is our land, but unfortunately we cannot visit it anymore.”

At the Lions’ Gate, the pilgrims saw their first Israeli soldiers as squads of border police rushed by. Vendors laid out food on tarps. It is the season for raisins and dried figs. The travelers thought the prices were better in Gaza.

Faisal Buhasi, 66, a retired teacher who had worked for the U.N. schools in Gaza, entered the mosque compound. He washed his hands and feet, right to left, three times and went to pray at al-Aqsa Mosque as his wife went to pray with the women at the Dome of the Rock.

The Friday sermon was about the importance of respecting one’s elders and obeying one’s parents.

Jews call the raised esplanade where the dome and mosque are located the Temple Mount, the site of their first and second temples, and the most holy in Judaism. Yehuda Glick, an Israeli parliamentarian and activist for the rights of Jews to ascend the Temple Mount and pray, said that young men were waving Hamas flags, but Buhasi and his wife did not see them.

Buhasi said, “The extremists on both sides bring dishonor to their religions.”

The couple made an unusual side trip to visit the Church of the Holy Sepulchre, which marks the place where the faithful believe Jesus was crucified, was entombed and rose from the dead. Buhasi explained that one of his sons had traveled to Hungary, where he married a Christian from Iceland. They assumed she would appreciate the photographs they took inside the ancient church.

Buhasi said he and his wife would like to apply for asylum in Iceland or Hungary. They didn’t care which. They just wanted out of Gaza, one of the most densely populated places on the planet.

Years ago, before Hamas and the wars and the two Palestinian intifadas, Buhasi said, it was possible to travel a little — he visited Egypt, Europe, Libya and Saudi Arabia. But Egypt has shut its border with Gaza because of Hamas. Its crossing at Rafah has been open only a couple of weeks over the past two years. Israel has permitted 10 times as many Gazans to pass through its crossing than the Egyptians have. There is no airport, no seaport in Gaza.

By 2:30 p.m., everyone was back aboard the bus for the ride home. The passengers were hot and tired. Fathia Shamiya, 58, had bought a doll for her granddaughter and costume jewelry for her daughters. She said she was moved by her experience and explained that each prayer at ­al-Aqsa Mosque is worth 500 at the local mosque in Gaza.

“I am satisfied,” she said. Her husband used his cellphone to take videos of the walls of the Old City as the bus drew away.

Fikriya Qumaa, 70, said her son applied for her permit for the day’s pilgrimage and presented it to her as a surprise gift. She was last here when her son was a boy. He is now 54. “I don’t know how to explain it,” she said. “But my heart feels happy.”