BETHLEHEM, West Bank — The runners looped four times through this city, following a route that took them from the Church of the Nativity, traditionally considered Christ’s birthplace, down Bethlehem’s main avenue and alongside Israel’s looming separation barrier, scrawled with graffiti and blackened from hurled projectiles.

The Palestine Marathon, held last week, is a hemmed-in affair, much like the city where it is run. “In Bethlehem, there’s not a continuous 42 kilometers,” huffed Marwa Younis, 32, as she ran. “You have to run back and forth.”

But that is exactly why the organizers of the Right to Movement: Palestine Marathon chose to stage it here. What better way to draw attention to the constraints Palestinians say they face in their daily lives?

“We want to send a message that we don’t have the right to movement — we are occupied and have the apartheid wall,” said an organizer, Diala Isid, referring to Israel’s 26-foot-high separation barrier, which surrounds the city on three sides. “So we thought, ‘Let’s make an international marathon.’ ”

About 3,100 people signed up for the race, which included six-mile and 12-mile options alongside the full 26.2-mile course. About three-quarters of the participants were Palestinians; most of the foreigners were from the United States, Britain, France and Denmark, which sent seven Parliament members.

Bethlehem is a postcard-perfect location to display Palestinian grievances: There is the Church of the Nativity, cobblestone alleys and ornate homes, and the separation barrier.

Israel built the barrier in response to a wave of suicide bombings during the Second Intifada. Palestinians see it more as a land grab because it frequently dips into the West Bank, swallowing what they see as their traditional lands.

Much of the West Bank is under direct Israeli military rule, while tiny Gaza — just about the length of a marathon run in a straight line — is blockaded by Israel and Egypt. And Palestinians are mostly severed from East Jerusalem, their hoped-for future capital.

“When people see how Palestine is cut up and how Israelis rule over it, people will change their opinions of us,” Salam Masalma, 18, said of the marathon, wearing sunglasses and a Muslim head scarf with her running outfit as she prepared to run six miles.

What was on her running playlist? “As a Muslim, I listen to the Quran,” Ms. Masalma said. Then she grinned. “I also have Shakira and Lady Gaga.”

For many Palestinians, the marathon was a day of fun in the usually morose West Bank. Thousands of Palestinians and foreigners crowded into the city’s central Manger Square; the Church of the Nativity on one side, a mosque on the other.

Image

Runners waited in Manger Square, next to the Church of the Nativity, for the marathon to start.CreditUriel Sinai for The New York Times

Boys performed back flips as others danced to Taylor Swift, Stromae and thumping Palestinian songs. Crowds hooted as red, black, green and white balloons, the colors of the Palestinian flag, were released. Grinning Palestinian Girl Scouts in beige uniforms could barely stay in formation.

“I am so excited!” said one of the scouts. “The atmosphere — it’s the first time for me! Everybody is so happy! There’s music, and we will play!” She was cut off by a supervisor, blowing on a whistle to order the girls into line.

The marathon participants began at the church, running past a small mall, a KFC restaurant and shops selling olive wood souvenirs. Palestinian men clapped and whistled as they passed.

A Danish runner, Kasper Hansen, 27, came with his girlfriend to run the marathon.

“It’s a great way to see Bethlehem,” Mr. Hansen said. “The fact that you are running along this wall,” he said, glancing at the separation barrier, “it’s not just about running, but about not being able to move.”

Ms. Younis, who lives in Ramallah, West Bank, had to navigate the Valley of Fire, a perilous route that involves a steep valley with inclines that can ruin cars, to reach Bethlehem. She is prohibited from taking a more direct path through Jerusalem without Israeli permission.

Image

Local residents cheered as participants in the Palestine Marathon ran past them.CreditUriel Sinai for The New York Times

Around 40 Palestinians arrived from Gaza, including Nader al-Masri, who was a member of the Palestinian team at the Beijing Olympics in 2008. For many, it was the first time they had seen the hilly territory meant to form the other flank of a Palestinian state.

One of the Gazans, Yousef Abeid, 21, grew animated as he described the green hills and exclaimed, “There’s electricity!” His friends burst into laughter; Gaza residents are accustomed to hourslong power failures.

The contrast between conservative Gaza and relaxed Bethlehem, where some women ran the marathon in skintight pants and sleeveless tops, was also clear.

Hana Abu Emaylaq, 29, one of Gaza’s few female runners, trains in a stadium to avoid scorn. It was the first time she had run in an open Palestinian area.

Not everything went smoothly with the Palestine Marathon. It was held on a Friday, the communal day of prayer for Muslims, when many people go to nearby Jerusalem to pray in the revered Aqsa Mosque. But marathon organizers closed roads near the checkpoint, forcing dozens of elderly Palestinians to walk several more miles.

Zahra Khader, 68, limped beside the barrier in a traditional Palestinian dress, embroidered with flowers and birds. “God willing, I can make it on these legs,” she sighed.

The rush of Palestinians to Al Aqsa came after the Israeli authorities began relaxing some restrictions on movement over the past few months, allowing tens of thousands to enter without a permit.

And for the first time, Gazans were permitted to travel to the West Bank to participate in the Bethlehem marathon, said Shai Grunberg, a spokeswoman for Gisha, an Israeli rights group.

That made the run harder for the natives as the Gazans dominated, with Mr. Abeid winning the 12-mile race and Mr. Masri, the Olympian, winning the marathon in 2:57:14.

Mr. Abeid said he would have had a faster time if he had not spent the previous day mixing concrete on a work site. He said his training often consisted of running from his university, where he studies sports management, to his job.

“This shows,” he said with a smile, “Palestinians can’t be broken.”

Isabel Kershner contributed reporting from Jerusalem.

A version of this article appears in print on , on Page A8 of the New York edition with the headline: In Four Loops, a Marathon Tries to Send a Message. Order Reprints | Today’s Paper | Subscribe