A Palestinian demonstrator hurls stones toward Israeli troops during clashes at a protest against U.S. President Donald Trump's decision to recognize Jerusalem as the capital of Israel, near the West Bank city of Nablus, December 29, 2017. REUTERS/Mohamad Torokman

GAZA (Reuters) - Thousands of Palestinians took to the streets of Gaza and the occupied West Bank for the fourth Friday in a row in protests against U.S. President Donald Trump’s recognition of Jerusalem as Israel’s capital.

Palestinian health officials said at least 50 protesters had been wounded by live fire, mostly along the Gaza border. An Israeli military spokeswoman said soldiers had shot at the “main instigators” who she said posed a direct threat to the troops and who were trying to damage the border security fence.

The spokeswoman said about 4,000 Palestinians across the West Bank and Gaza, some throwing rocks and fire bombs and setting tires alight, confronted Israeli soldiers who responded mainly by firing tear gas.

In Gaza, demonstrators chanted “Death to America, death to Israel, and death to Trump” and militants fired rockets into Israel, drawing strikes by Israeli tanks and aircraft.

The military said it targeted posts that belonged to Hamas, the Islamist group that controls the Palestinian enclave, after intercepting two of the three rockets fired into Israel. Police said the third struck a building, causing damage. No casualties were reported in those incidents.

Trump outraged Palestinians and sparked anger in the Middle East and among world powers with his Jerusalem declaration on Dec. 6, which reversed decades of U.S. policy on one of the most sensitive issues in the Israeli-Palestinian conflict.

Israel considers Jerusalem its eternal and indivisible capital. Palestinians want the capital of an independent Palestinian state to be in the city’s eastern sector, which Israel captured in the 1967 Middle East War and annexed in a move never recognized internationally.

Most countries regard the status of Jerusalem as a matter to be settled in an eventual Israeli-Palestinian peace agreement, although that process is now stalled.

A U.N. General Assembly resolution passed on Dec. 21 rejected Trump’s Jerusalem declaration. A total of 128 countries voted for the U.N. resolution. Nine opposed it and 35 abstained. Twenty-one countries did not cast a vote.