New York -  President Barack Obama told Israeli Prime Minister Benjamin Netanyahu on Wednesday he had concerns about Israeli settlement expansion in the occupied West Bank and hoped the United States could still help to achieve Israeli-Palestinian peace.

“Clearly there is great danger of not just terrorism but also flare-ups of violence,” Obama said at the start of what was likely to be his last meeting as president with Netanyahu. Obama leaves office in January.

“We do have concerns around settlement activity as well. And our hope is that we can continue to be an effective partner with Israel in finding a path to peace,” Obama told reporters as the two leaders met on the sidelines of the annual United Nations gathering of world leaders.

Netanyahu, who has had a rocky relationship with Obama, said he appreciated their many talks about challenges facing Israel. Netanyahu has led Israel for all but about the first two months of Obama’s nearly eight years in office.

“The greatest challenge is of course the unremitting fanaticism. The greatest opportunity is to advance ... peace. That’s a goal that I and the people of Israel will never give up on,” Netanyahu said.

“We’ve been fortunate that in pursuing these two tasks, Israel has no greater friend than the United States of America.”

The two leaders spoke to reporters before they met.

Afterwards, a senior U.S. official told reporters they had spoken about Israeli-Palestinian relations, a spike in violence and the expansion of Israeli settlements in the West Bank, home to more than 2.7 million Palestinians.

The official said the talks also included “continuing Israeli settlement activity as Israel enters the 15th year of its occupation and profound U.S. concerns about the corrosive effect that that is having on the prospect for two states.”

The Palestinians hope to establish an independent state in the occupied West Bank along with the Hamas-controlled Gaza Strip and East Jerusalem as its capital. Israel captured the West Bank in the 1967 Arab-Israeli war.

Obama made reference to a $38 billion military assistance agreement signed by the two allies on Sept. 14.

“It is a very difficult and dangerous time in the Middle East, and we want to make sure that Israel has the full capabilities it needs in order to keep the Israeli people safe,” Obama said.

The package constitutes the most U.S. military aid ever given to any country, enabling Israel to upgrade most of its fighter aircraft, improve its ground forces’ mobility and strengthen its missile defense systems, a senior U.S. official said last week.

Most countries view Israeli West Bank settlements as illegal and an obstacle to peace. Israel rejects this, saying Jews have been living in the territory for thousands of years.

In addition to its estimate of 2.7 million Palestinians in the West Bank, the CIA Factbook online cites about 371,000 Israeli settlers living in the West Bank as of July 2015. Neither figure includes East Jerusalem, which both sides claim.