The Israeli government on Monday withdrew the nomination of Dani Dayan — a former West Bank settlement leader — as ambassador to Brazil, ending a seven-month spat with the Brazilian government. Brazil, which formally recognized the state of Palestine in 2010, had refused to accept Dayan as the ambassador because of his links to Jewish settlements in the occupied territories.

“Prime Minister and Foreign Minister Benjamin Netanyahu has decided to appoint Dayan as consul general in New York,” the Israeli prime minister’s office said in a brief statement released Monday.

The move is a marked departure from the stance previously adopted by Netanyahu, who had initially vowed to stand firm on Dayan’s nomination, even at the cost of souring relations with Brazil. Since he was nominated for the position in August, the Dilma Rousseff-led administration had steadfastly refused to accept Dayan’s credentials.

“I don't think that we folded. There was no choice,” Dayan, who himself lives in a West Bank settlement and is the former chairman of a settler council, reportedly told Israel's Army Radio when asked about the new appointment. “Those that did not want us in Brasilia, ended up getting us in New York, the capital of the world.”

The occupied territories in the West Bank, which Palestine says should be part of its future state, have been held by Israel since the Six-Day War in 1967, in direct contravention of the United Nations resolutions 242 and 446, which call for the withdrawal of the Israeli military from the region and an end to expansion of Jewish settlements.

According to an estimate by Israeli nonprofit Peace Now, in 2015, construction of 1,800 housing units, including nearly 1,550 permanent structures, began in West Bank settlements. Of these, at least 32 houses were built on private Palestinian land.

Nearly 600,000 Israelis live in the West Bank and east Jerusalem.

The Brazilian government, on its part, has repeatedly called for the creation of an “economically viable, territorially contiguous and sovereign” Palestinian state based on the internationally recognized borders of 1967.