For a macho, walking away from a fight is hard to do. You feel filled with righteous indignation and the fury of defending a just cause, and sometimes it hurts more to turn away than to face your antagonist and duke it out. Still, sometimes it is the right thing to do, and never has turning the other cheek proven to be the better alternative than this week in the United States Senate.

In the weeks leading up to Thursday’s historic 68-32 Senate vote passing comprehensive immigration reform legislation, a crisis loomed that threatened to scuttle the long tough slog. As the bipartisan Gang of Eight senators absorbed each attack on their proposed bill, modifying this or that provision, and accepting this or that amendment, ironically it was one of the undocumented immigrants’ best friends who posed the gravest threat.

If Senator Leahy had dug in his heels on the issue of gay foreign partners, the bill might never have made it to the floor for a vote.

- Geraldo Rivera

As modifications were being made to strengthen border security and otherwise mollify critics of the bill, one of the liberal lions of the Senate, the chairman of the Judiciary Committee Patrick Leahy of Vermont, was poised to offer an amendment that would allow gay citizens to sponsor their foreign partners for cherished green cards, allowing them to work and stay in the United States indefinitely. The proposal was logical and fair, and provided symmetry to the legislation because it granted to married gays the right to sponsor their foreign-born spouses in the same manner married straight folks can under existing rules and regulations.

Except that it would have doomed the immigration bill to defeat. In fact, if Senator Leahy had dug in his heels on the issue of gay foreign partners, the bill might never have made it to the floor for a vote.

Importantly, two of the four Republicans in the ‘Gang’ let it be known that they would never allow the proposal to become part of their bill. Both Marco Rubio of Florida and Lindsay Graham of South Carolina told the world that the passage of a bill that allowed the importation and granting of important federal benefits like Social Security to gay foreigners was not going to happen.

A longtime advocate of marriage equality, Leahy vowed to fight, even if it meant taking the whole movement toward immigration reform down with it. And a bizarre civil war loomed within the Latino community. For a time it seemed as if Latino advocates of immigration reform would be pitted against Latino advocates of marriage equality in a fight over which we needed more attention, immigration reform or marriage equality? Thankfully, in the end cooler heads prevailed.

Numerous accounts credit another senate lion, the usually pugnacious Republican John McCain of Arizona, who joined with the Democrats in the Gang of Eight, especially Senator Bob Menendez of New Jersey in suggesting that the best thing to do on the issue of gay foreign partners was nothing at all.

By happy coincidence, a Supreme Court decision on the constitutionality of the federal law which established the odious distinction between traditional and same sex marriage was due at around the same time the Senate was being called on to vote on immigration.

Called DOMA, the 1990’s-era Defense of Marriage Act was not even being defended by the Justice Department. That increased the odds DOMA would be struck down by the High Court, and to great bi-coastal celebration from the Castro District in San Francisco to the Stonewall Inn in Greenwich Village on Wednesday of this week DOMA died.

Now, when and if comprehensive immigration reform becomes the law of the land, still a huge long-shot because of House Republican intransigence, no distinction will be made in the treatment of married couples, gay or straight. Which reminded me of something the author of “The Art of War” Chinese general Sun Tzu said, “He who knows when he can fight and when he cannot, will be victorious.”

On an unrelated note, too bad New England Patriot star tight end Aaron Hernandez didn’t heed Sun Tzu’s advice. The troubled 23-year old former gangbanging All Pro from the mean streets of Bristol, Connecticut has been charged with the mob-style assassination of another football player, 27-year old Odin Lloyd. As the judge said of Hernandez, “This gentleman…in a cold-blooded fashion killed a person because that person disrespected him.” The star of New England’s Puerto Rican community, Hernandez is now also a suspect in two other unsolved drive-by slayings following a nightclub brawl. Like I said, sometimes, you just have to walk away.

Geraldo Rivera is currently a Fox News Senior Correspondent.