The ministry said he was shot in the head in Qarawat Bani Hassan, west of Salfit, in the north of the occupied West Bank.
Witnesses told the official Palestinian news agency WAFA that settlers had attacked a group of Palestinians, opening fire at them. They said Rayan was critically injured and died soon after.
The Palestinian Ministry of Foreign Affairs and Expatriates blamed the killing on “terrorist settler militias.”
A local settler leader said that the settler who shot Rayan had “acted appropriately.”
“He defended his life from a mob of rioting and rampaging terrorists,” said Yossi Dagan, the head of the Shomron Regional Council, which represents Jewish settlers in the area.
The killing took place on land which Israel captured from Jordan in 1967. International law considers it illegal for Israeli settlers to live there.
Dagan said: “We will continue to build and flourish the wilderness in our country in Jerusalem, in Tel Aviv, in the Negev, in the Galilee, and in Judea and Samaria,” the Biblical names for the West Bank.