Then on Tuesday, he pulled out a gun at the back entrance of the community, killed three security men and seriously wounded another before he was shot dead himself.
While Israeli and Palestinian officials blamed each other for the shocking terror attack, the real story appears to be far more pedestrian: Jamal was despondent over his broken marriage and apparently on a suicide mission.
Israeli and Palestinian experts say there have been dozens of similar cases throughout a two-year spate of violence in which suicidal Palestinians plagued by emotional and psychological issues carried out deadly attacks that only retroactively were cloaked in nationalism to hide the shame of their personal problems.
Out of some 400 Palestinian attacks tracked by Israel since September 2015, about 18 percent of assailants were driven by personal issues, according to Israel's Shin Bet security agency. Roughly two-thirds of the cases were ideologically motivated, and 15 percent were driven by unknown factors, the agency said.
A Shin Bet official said these despondent attackers have included the mentally ill, victims of domestic violence, people with economic hardships and women who had "dishonored the family" with sexual indiscretions.
Turning a personal grievance into a nationalist attack carries several advantages. While suicide is frowned upon in Palestinian society, attacks on Israelis, especially security forces or those residing in the West Bank, enjoy widespread support, and anyone killed in a clash with Israelis is seen as a "martyr."
On a practical level, their families are eligible for financial packages from the "martyrs' fund," which provides stipends to relatives of people killed or imprisoned by Israel. The Israelis have long claimed this provides an incentive for Palestinian violence.
"Once again, a murderer sets off in the morning on his own accord, incited by the Palestinian media and authorities, to kill Israelis for one of only two goals he can strive for—either be killed and become a respectable martyr in his community or be imprisoned ... and provide his family decent financial support from Palestinian authorities," Lior Ackerman, a former top Shin Bet official, wrote.
In the case of Jamal, a Shin Bet investigation found that the 37-year-old was a troubled man with a history of domestic violence. His wife had recently fled to Jordan to escape his abuse, leaving him behind with their four children. In a note later posted on Facebook, Jamal called himself a bad husband and asked for his wife's forgiveness. Those close to him however, say he was not troubled.
His attack shocked the community of Har Adar, where he was well known and a welcome visitor in many homes. Har Adar is an upscale town that straddles the boundary on the Green Line, and its population is generally has good relations with neighboring Palestinian villages.
"This is a single attacker, one guy who is a psycho, and we don't want to associate him with all the other Palestinian workers who have been coming here peacefully for 30 years," said Chen Filipovitz, the head of Har Adar's local council. "He had problems and he brought his problems to us."
The trend has added to the mystery of the past two years of violence. Unlike previous rounds of fighting that were organized primarily by established militant groups, the current round has been characterized by "lone wolf" assailants acting on their own. Israel accuses Palestinian leaders of inciting the violence.
But in a book coming out this week, Palestinian lawmaker Khalida Jarrar said she conducted an informal study in Israeli prisons in which she found that of the 93 women jailed with her, 46 were there as a result of "social oppression."
Jarrar, who spent over a year in prison after being convicted of incitement, details the accounts of 10 who turned to violence because they were forced to marry against their will. Others described a desire to escape sexual harassment, embarrassing divorces and abusive parents.
One 16-year-old girl told Jarrar that her father tormented her mother and made their life miserable. "I couldn't stand it, so I took a knife and went to the checkpoint," she was quoted as saying.
Israel has enacted a policy of demolishing the houses of the attackers' families, claiming it is a deterrent to future attackers.
The military said Wednesday it was already preparing to tear down Jamal's home, and Prime Minister Benjamin Netanyahu revoked the work permits of his relatives. Some hawkish politicians have advocated even tougher collective measures, such as banning Palestinian entrance into Israel completely, punishing Mahmoud Abbas's Palestinian Authority and launching a massive West Bank construction drive.
But none of that would do much against those already in Israel with permits, or Palestinian residents of eastern Jerusalem, who have residency rights and freedom of movement in Israel.
Alaa Abu Jamal, a Jerusalem technician for Israel's phone company, rammed his company car into a crowd in October 2015 without notice or apparent motive, killing one Israeli and wounding another. A month later, Raed al-Masalma, an employee of a Tel Aviv restaurant, stabbed two people there.
In the West Bank, where psychological issues are considered taboo, many Palestinians were reticent to discuss the phenomenon because they said it undermined their national cause. In Jamal's village of Beit Surik, most denied he was troubled.
The Palestinian Ministry of Prisoners Affairs refused to discuss the issue for the same reason. However, a lawyer who works closely with many inmates agreed to do so anonymously because she did not want to violate the confidence of her clients.
"Many assailants, particularly women, have carried out attacks to escape social problems. It's an honorable escape act since attacking an Israeli officer or settler is seen as the most prestigious action in Palestinian society," she said. "When you attack an Israeli you are a national hero."