It took only one wrong vote to teach a freshman Democrat from Texas how sensitive, and even wrathful, the Jewish community can be when it comes to Israel.

But the real story of what happened to Rep. Beto O’Rourke did not stop with the angry reaction he got when he cast one of only eight votes in Congress against special funding for Israel’s Iron Dome rocket defense system during the recent Gaza war.

What is notable is how quickly the carrot followed the stick.

It was almost a textbook case of how the establishment pro-Israel lobby works its magic — and a story not yet completed in early September, when The New Yorker magazine took note of what had happened to O’Rourke.

In an in-depth report on the work of the American Israel Public Affairs Committee, the large Washington-based lobby, during the Gaza war, New Yorker writer Connie Bruck recounted the blasts that rained down on the El Paso congressman following his vote.

The reactions, as Bruck reported, included a mass email blast labeling O’Rourke as “an anti-Israel congressman” and denouncing his vote as “shameful.” Critical local press coverage included a public comment by one of his own Jewish donors to the El Paso Times that in voting as he did, O’Rourke “chooses to side with the rocket launchers and terror tunnel builders” of Hamas.

But since then, behind the scenes, what has followed is a long process of mutual outreach and hours of hashing out differences, until the final act, which is now in the works: an El Al flight to Tel Aviv on the pro-Israel lobby’s dime.

“He’s a good guy, but he didn’t know how the Jewish community would react,” said Daniel Cheifec, executive director of the Jewish Federation of El Paso. “Now he knows that this community is not going to be very happy if he screws up again.”

O’Rourke, in fact, had no prior record of criticizing or voting against Israel. He did not even oppose more funding for the Iron Dome system. He only opposed rushing through the large appropriation with no debate as members of Congress were hurrying home for the summer recess when a more considered vote to boost the program was coming in October.

Israel, which receives more than $3.6 billion per year in various forms of aid from Washington, is already the single largest recipient of American largesse. But the August 1 House vote appropriating $225 million to Israel above and beyond its usual aid was meant to allow the Jewish state to restock on Iron Dome interceptors that had proved effective in countering Hamas rocket attacks into the country.

Congressional leaders squeezed the vote into the legislative schedule just as members were packing up to leave for their summer recess. The overwhelming support of 395 representatives with only eight voting against was not unusual for a pro-Israel piece of legislation, especially one that deals with military assistance at a time of war.

“I really don’t understand how he makes his decision,” Rabbi Stephen Leon of Congregation B’Nai Zion, a local synagogue, told the El Paso Times even before The New Yorker piece picked up on the pushback. “It’s a great, great disappointment to the Jewish community here. We had meetings with him prior, to talk to him about the importance of Israel, and the way he voted makes very little sense.”

El Paso, a city with a 70% Hispanic majority, has a relatively small Jewish community, estimated at 4,000, amid a population of some 862,000. But Jews are well represented on O’Rourke’s donor list, with local businessman Stephen L. Feinberg among the top contributors to his campaign.

O’Rourke, in a Facebook posting, tried to explain his vote. “I could not in good conscience vote for borrowing $225 million more to send to Israel, without debate and without discussion, in the midst of a war that has cost more than a thousand civilian lives already, too many of them children,” he wrote. He also stressed that with an aid package for Israel up for a vote in two months, he felt no need to rush more spending without adequate debate when Congress was all but empty.

To members of the Jewish community who later spoke with him, O’Rourke also explained that he was one of the last to vote in the roll call, at a point at which it was clear the bill was cruising toward passage. He consequently felt free to cast a vote on principle, knowing it would not impact the final outcome. O’Rourke believes that every appropriation should be properly debated.

Veteran Democrat Jim Moran of Virginia, who is known for refusing to vote along the lines of the pro-Israel lobby, tried to warn O’Rourke. “I tried to find him on the floor, but I couldn’t,” he told The New Yorker. “I’m afraid he may have a tough race in November.”

At O’Rourke’s office, emails flooded his inbox. The El Paso Jewish federation sent out an alert to members, urging them to take action. It contained O’Rourke’s contact information and a suggested sample letter. Another email, for which no one will now take responsibility, circulated among Jewish activists urging supporters not to re-elect him.

This threat is all but empty, since O’Rourke faces no real challenge in his strongly Democratic district.

Beto (short for Robert) O’Rourke, 41, is a fourth-generation El Paso native who started off his career in a teenage rock band. He studied at Columbia University and returned to his hometown, where he ran for city council before moving on to the national scene. His political focus has been on immigration and veteran affairs, two key issues for a border town that hosts a large army base. But he won more recognition for his call to legalize marijuana, an uncommon voice in the state of Texas. Foreign policy has never been a top priority.

Hours after the controversial vote, O’Rourke launched a damage-control campaign that proved to be effective. He reached out to Jewish donors and friends who were more than happy to start the healing process.

A meeting was arranged with a group of 10 pro-Israel local leaders, including key members of AIPAC, along with heads of the local synagogues and of the Jewish federation. “We didn’t ask him to apologize for his vote,” Stuart Schwartz, a former county commissioner and longtime AIPAC supporter, told the Forward. “He is a very principled man, and he believed that his vote was justified under these circumstances.” It was Schwartz who earlier denounced him for having sided with “the rocket launchers and terror tunnel builders.”

“We explained that it was particularly painful for us,” Schwartz added, “and he understood there is a lot of emotion here.”

After the first meeting came another and then a third one. In between, pro-Israel activists sent O’Rourke articles explaining Israel’s position. O’Rourke also met with the Israeli consul general to the Southwest, Meir Shlomo, and invited federation leaders to meet with him in Washington when they come to the capital for the Jewish federations’ General Assembly in November.

The talks, participants said, were friendly and open. O’Rourke, they reported, took real interest and noted that his voting record makes clear he had never opposed American aid to Israel. He even doled out an anecdote about some Jewish ancestry in his family. Pro-Israel activists came out satisfied, attributing the vote against Iron Dome to a freshman’s mistake rather than to a pattern of anti-Israel voting. “A bump in the road,” in the words of Schwartz.

O’Rourke, according to Cheifec, even absorbed some of the pro-Israel activists’ skepticism regarding talks aimed at dismantling Iran’s nuclear capabilities. “He told us he is a lot less optimistic about a diplomatic solution with Iran than he was in our first meeting, and that was only a month and half ago,” he said. “This means he is doing his homework.”

O’Rourke initially agreed, but then later he declined to be interviewed for this article.

The final chapter in his run-in with the pro-Israel lobby will be written soon. In the spring, or perhaps even sooner, O’Rourke will join a group of lawmakers going to Israel on a trip arranged by an AIPAC-affiliated organization.

“We’re very pleased he will be setting aside time to visit Israel,” Schwartz said.

Contact Nathan Guttman at guttman@forward.com or on Twitter, @nathanguttman