GAZA CITY, Gaza Strip — At least 58 Palestinians were killed by Israeli forces and more than 2,700 others were wounded Monday after thousands of protesters converged on the razor-wire fence between the Gaza Strip and Israel as the U.S. Embassy opened in Jerusalem.

The Israeli Defense Forces opened fire on protesters approaching the barrier and accused the militant Palestinian group Hamas of "leading a terrorist operation under the cover of masses of people." The military said "firebombs and explosive devices," as well as rocks, were being thrown toward the barrier.

The Israeli military said the demonstration involved 40,000 people "taking part in violent riots" at 13 locations along the boundary. Israel built the 40-mile fence along Gaza's land border for security reasons in 1994.

The Gaza protest started on March 30. Monday's march was meant to express anger over the inauguration of the U.S. Embassy, while Tuesday is "Nakba," or Catastrophe Day, so named for the uprooting of hundreds of thousands of Palestinians who fled or were expelled after Israel was founded in 1948.

Moving the embassy from Tel Aviv breaks with decades of Washington policy and distances the United States from its allies. Palestinians also consider Jerusalem their capital.

Palestinians run for cover from tear gas east of Jabalia in the Gaza Strip on Monday. Mohammed Abed / AFP - Getty Images

President Recep Tayyip Erdogan of Turkey, the only majority Muslim member of NATO, declared three days of mourning on Monday and withdrew his ambassadors in Washington and Tel Aviv for consultations.

"With this latest step, the United States has chosen to be a part of the problem and not the solution and has ceased to be and has lost its role as mediator in the Middle East peace process," Erdogan said during a visit to London, where he met with British Prime Minister Theresa May.

Eric Pahon, a spokesman for the U.S. Defense Department, called Turkey "an indispensable partner in operations to defeat ISIS," saying the two countries were continuing to work "on a variety of mutual security concerns."

The protest movement started not with a bullet or a bomb, but with a hashtag.

"What if 200,000 demonstrators came out in a peaceful march and broke into the barbed wire east of Gaza?" Ahmed Abu Artema, 32, a Palestinian journalist, wrote on Facebook on Jan. 7.

"What can a heavily armed occupation do to those peaceful human waves?" he asked.

Artema ended the post with #GreatMarchofReturn — a slogan that went viral and then, two months later, blossomed into reality.

A total of 107 people have been killed and around 12,300 others wounded since the protests began on March 30, according to Gaza's Health Ministry. Several hundred of the injured were children, according to Save the Children.

Addressing the bloodshed on Twitter, Israeli Prime Minster Benjamin Netanyahu wrote in Hebrew: "Every country has an obligation to defend its borders. The Hamas terrorist organisation declares it intends to destroy Israel and sends thousands to breach the border fence in order to achieve this goal. We will continue to act with determination to protect our sovereignty and citizens."

Marchers say they have continued to turn out for the weekly demonstrations because they have so little to lose. More than a decade under Israeli and then Egyptian blockades has left the enclave's 2 million people, particularly its youth, largely jobless and hopeless.

Peace seems increasingly far off, and, for most Gazans, gaining permission to leave is impossible without solid education or job opportunities abroad.

"The youth really struggle with a lack of prospects and hope of a good life," said a recent graduate, Anass Jnena, 23. "I have seen friends really weep in silence because they could not get to travel out."

The movement spawned from Artema's Facebook post has defied much of the conventional wisdom about Gazan resistance to the Israeli blockade. It has remained relatively peaceful and largely free from domination by powerful militant factions, while including female activists.

"Everybody agrees that this is a kind of public struggle," Artema told NBC News as he strolled through clumps of men, women and children sitting on the ground and in tents near the fence on Friday during the seventh weekly demonstration since the protests began. "We are against any faction or party taking this march into their agenda."

The movement's explicit demand is what Palestinians refer to as their "right of return" — the demand that Israel allow the return of millions of Palestinians whose families left or were removed from Israel at its founding in 1948. Refugees and their descendants make up more than two-thirds of Gaza's population.

Decades of Israeli leaders have argued that allowing millions of Palestinians to return would diminish Israel's foundational character. But it was the Trump administration's decision to move the U.S. Embassy to Jerusalem that became the major motivating factor, according to organizers and participants.

Getting powerful groups to join — but not dominate — the movement took convincing, said Salah Abdel Ati, head of the international and legal committee of what is being called the Great March of Return. Hamas won elections in 2006 and has run Gaza since the end of a violent power struggle with a rival political party the following year.

Organizers say the Great March of Return is financed by small donations and governed by a central committee of about 27 representatives from political and civic groups — including the dominant West Bank political party, Fatah, as well as Hamas and Palestinian Islamic Jihad, both of which the United States categorizes as terrorist organizations.

Organizers have tried to keep the protests peaceful. Said Khatib / AFP - Getty Images

Despite the high ideals, demonstrators have resorted to violence.

"I do understand why they throw stones," said Anas Inaina, 25, a project coordinator. "You do not throw flowers when you are just suffocating here."

But human rights groups have faulted Israel for answering rudimentary weapons with live ammunition. The Israeli Defense Forces have said it was necessary to protect Israeli citizens.

“Shocking killing of dozens, injury of hundreds by Israeli live fire in #Gaza must stop now. The right to life must be respected. Those responsible for outrageous human rights violations must be held to account. The int'l community needs to ensure justice for victims” – #Zeid. pic.twitter.com/hBb7825Sp8 — UN Human Rights (@UNHumanRights) May 14, 2018

Israeli officials are eager to prevent a breach massive breach of the fence and potential attacks in communities on the other side. They have warned Palestinians to keep well away.

During the first demonstration on March 30, Israeli soldiers killed more than 20 protesters. Video showed several people being shot as they ran away.

The death toll jumped substantially on Monday, now topping 100. No Israelis have been killed or injured.

IDF troops are responding with riot dispersal means and fire, and are operating according to standard operating procedures — IDF (@IDFSpokesperson) May 14, 2018

Keeping the protests peaceful has been one of the organizers' principal challenges, particularly reining in desperate young men.

The presence of women and children has had a calming influence — a novelty for Gaza resistance that Israeli officials have likened to the use of human shields.

While the presence of women and children has been unusual for Gaza resistance, Israeli officials have accused protest organizers are using them as human shields. MAHMUD HAMS / AFP - Getty Images

Organizers and rank-and-file activists hope the movement will remain peaceful beyond this week. But they also worry that Israel's violent reaction could lead to an unmanageable situation — one that would once again push violent groups like Hamas and Islamic Jihad to the forefront.

"We believe we will continue," said Ati, speaking before dozens of people were killed Monday. "That's one scenario. The other scenario is if the Israelis kill more people, if there's a massacre ... maybe we will go to war."

Matt Bradley, Charlene Gubash and Wajjeh Abu Zarifa reported from Gaza City, Paul Goldman from Jerusalem, Lina Dandees from Tel Aviv and Jason Cumming and F. Brinley Bruton from London.