He refused, attempting to use his wives and children as human shields to protect Hamas weaponry.
The IDF saw a large number of people leave the apartment building and concluded that the buildings were empty before bombing it:
During this episode, which was widely reported by NGOs, Ri‘an and members of his family were killed in an aerial strike that hit their home. Ri‘an was a senior Hamas operative, but he was not the target of the attack, although the IDF legitimately could have treated him as a military target due to his central role in planning and executing terrorist attacks. Instead, the operational goal of the strike was to destroy Hamas‘ central compound in the Jabaliya refugee camp. The compound included several buildings that served as storage sites for large quantity of sophisticated weapons. The IDF limited the planned attack to the weapons storage site and did not seek to injure or harm Ri‘an or, of course, any members of his family.
In an effort to ensure that it destroyed only the storage facilities, and did not harm civilians residing in the buildings, the IDF issued several warnings before the attack. These included not only general leaflets and telephone calls, alerting civilians to avoid facilities serving Hamas and other terrorist groups, but specific phone calls to the residents of the targeted buildings, notifying them of the planned strike and warning them to evacuate the premises. The IDF also fired two separate rounds of preliminary warning shots with light weapons, 13 minutes and 9 minutes before the strike, providing sufficient time for residents to evacuate. The residents evidently understood these early warnings, as a group of them did leave the building, a fact confirmed by IDF surveillance before proceeding with the strike. The IDF observed this group evacuation and drew the reasonable conclusion that the buildings (including Ri‘an‘s house) were empty. Only then did the IDF launch the strike.
Following the strike, secondary explosions were visible. This confirmed that Hamas used the buildings for weapons storage, and therefore it was a legitimate military objective according to the Law of Armed Conflict. Only later was it discovered that, Ri‘an and his family chose to remain in the building after others had evacuated, leading to their death.
The deaths of the Ri‘an family members were tragic. Even so, it must be underscored that the IDF took appropriate steps to tailor its military strike to a proper military objective (the weapons storage site) under the cover of a civilian residence, and to extricate civilians from possible harm. To that end, the forces complied with international norms by giving effective advance warnings to at-risk civilians. That some civilians heeded these warnings, while the Ri‘an family apparently did not, does not render the IDF‘s action unlawful.
At the time of the strike, Reuters described Rayyan as "a 49-year-old cleric regarded as one of Hamas's most hardline political leaders."
Rayyan is listed as a "civilian" in the PCHR list of people killed in Gaza during the war.
The Al Qassam Brigades website is celebrating the third anniversary of his death, and illustrates this "civilian" with this photo:
His 16-year old son, Ghassan, killed with him, was described as an "al-Qassam shahid" by terrorist websites. And Rayyan had already sent one of his sons to his death on a suicide mission that killed two Israelis in 2001. That son was 16 as well.
A month after Rayyan was killed, NYT reporter James Bennet wrote in The Atlantic about an interview he had of Rayyan a few years earlier, showing his twisted and hateful worldview. But as I wrote at the time, Bennet never seemed to have published the details of that interview while Rayyan was alive.
Could it be because the New York Times wanted to keep the fiction alive that there was a difference between Hamas terrorists and its "political" wing?
Jeffrey Goldberg had interviewed Rayyan as well in 2006 and published details after his death (I don't know if he had printed this at the time):
Periodically, advocates of negotiation suggest that the hostility toward Jews expressed by Hamas is somehow mutable. But in years of listening, I haven’t heard much to suggest that its anti-Semitism is insincere. Like Hezbollah, Hamas believes that God is opposed to a Jewish state in Palestine. Both groups are rhetorically pitiless, though, again, Hamas sometimes appears to follow the lead of Hezbollah.
...Nizar Rayyan expressed much the same sentiment the night we spoke in 2006. We had been discussing a passage of the Koran that suggests that God turns a group of impious Jews into apes and pigs. The Hezbollah leader, Hassan Nasrallah, among others, has deployed this passage in his speeches. Once, at a rally in Beirut, he said: “We shout in the face of the killers of prophets and the descendants of the apes and pigs: We hope we will not see you next year. The shout remains, ‘Death to Israel!’”
Mr. Rayyan said that, technically, Mr. Nasrallah was mistaken. “Allah changed disobedient Jews into apes and pigs, it is true, but he specifically said these apes and pigs did not have the ability to reproduce,” Mr. Rayyan said. “So it is not literally true that Jews today are descended from pigs and apes, but it is true that some of the ancestors of Jews were transformed into pigs and apes, and it is true that Allah continually makes the Jews pay for their crimes in many different ways. They are a cursed people.”
I asked him the question I always ask of Hamas leaders: Could you agree to anything more than a tactical cease-fire with Israel? I felt slightly ridiculous asking: A man who believes that God every now and again transforms Jews into pigs and apes might not be the most obvious candidate for peace talks at Camp David. Mr. Rayyan answered the question as I thought he would, saying that a long-term cease-fire would be unnecessary, because it will not take long for the forces of Islam to eradicate Israel.