Quods, January 17 , SPA -- An Israeli court on Thursday sentenced a major in Israel's army reserves to five years in prison for offering secret information to Iran and the militant Palestinian Hamas, according to court documents, according to AP. David Shamir, a psychiatrist, was convicted of contact with a foreign agent and possession of information with the intent of endangering state security. He never managed to deliver any secret information. The three-judge panel of the District Court in the capital of Israel, Tel Aviv, wondered how anyone could undertake such a crime. «It eludes us as to why an allegedly normal man with a strong professional and social standing who was not lacking anything in his daily life could one day get up and offer himself to the greatest enemies of the state with the goal of destroying all that was supposed to be dear to his heart,» the judges wrote in their decision. Shamir, 45, an officer in a reserve unit of the Israeli army's medical corps, suggested that he offered information to Iran with the hope of making enough money to move his family out of harm's way away from Israel. «I don't hate the state of Israel,» Shamir told the court at his conviction hearing, the Haaretz newspaper reported. «The idea was to save my life and that of my son and the last years of my parents' lives, and to have things happen so that we can really be saved,» he said. «The thinking was that I would receive money which I would use to attain asylum for me, my son, and my family, and to enable them to live as reasonably as possible, not in Iran, not in Lebanon, but rather in a European country.» It was not clear exactly what danger Shamir was referring to, whether from Palestinian attacks or repeated calls by Iranian President Mahmoud Ahmadinejad that Israel should be «wiped off the map.» Shamir sent e-mails and faxes to Iranian and Hamas officials saying he could provide them with classified information, according to police and the indictment. In April, the doctor, a resident of a Tel Aviv suburb, e-mailed the foreign ministry of Iran, according to the indictment. He introduced himself as a well-connected Israeli officer and said he could offer details on the army's emergency medical programs, the location of medical command centers and evacuation plans for civilians during missile attacks, the court document said. Shamir later sent several faxes from his home to the Iranian consulates in London and Istanbul, again offering his services. The indictment indicated that the Iranians did not accept Shamir's offer. Shamir then turned to Hamas, sending an e-mail in early November to the Gaza Strip's Al-Azhar University, a stronghold of the Iranian-backed group that took over the coastal territory in June, saying that he wanted to «join the struggle.»