There is something about the experience of having power and authority that can become so intoxicating, so addictive, that those who hold it will periodically do things so outrageous, so unabashedly self-serving to cling to it.

Toward the end of his second term in City Hall, for example, Mayor Michael R. Bloomberg decided that his enthusiasm to serve as New York’s chief executive should override the will of the citizens of his beloved city as made patently clear in two referendums. In this case, the will of New Yorkers paled in comparison—and in sheer force—to that of the billionaire mayor, who persuaded an ambitious City Council speaker to co-sign his indulgence.

New Yorkers are now treated to yet another-box seat view of how ego trumps common sense, this time in Brooklyn. In the city’s most populous borough, where District Attorney Charles J. Hynes has served in that position for nearly a quarter century, the 78-year-old Hynes lost the Democratic primary last month for a seventh term.

Hynes lost to Kenneth Thompson, a bright, young former federal prosecutor who has pledged to work to curb gun violence, to protect the rights of workers and to assist in reducing the heinous impact of the Police Department’s stop-and-frisk program. Not only did Thompson beat the long-term incumbent, but he did so by a margin of 11 percentage points. Could there be a stronger message from the electorate?

In losing, Hynes was initially exceedingly gracious to his would-be successor. He told Thompson that he would work to ensure a smooth and orderly transition. And although he was selected by the Republican and Conservative parties to run as their candidate, Hynes said he would have no part of that.

“I said after I lost the primary that I would not actively seek re-election on the Republican or Conservative line,” Hynes told The New York Times, after the primary election. “Nothing has changed. I’m giving you a very clear, definitive answer.”

Ah, but as the harsh reality of the end of his prosecutorial power set in, Hynes’ courteous disposition eroded toward the man who would make history as the first African-American district attorney in Brooklyn. He announced that he would run after all as a Republican.

Hynes has come up with the most disingenuous rationale for running. He has claimed that former Brooklyn Democratic Party chairman Clarence Norman Jr. acted as field director for the Thompson campaign. Norman, who served and completed time in jail, was a particular target for Hynes. He also claimed that Thompson would end many of his most successful programs.

Thompson has made clear that the former Democratic chairman had no role whatsoever in his campaign. But furthermore, Hynes has had a long and close relationship with Assemblyman Vito Lopez, a former Brooklyn Democratic chairman whose career is checkered with misdeeds. Moreover, Thompson has stated publicly that he would continue some of the signature initiatives enacted by Hynes.

This would seem to be a highly quixotic race for Hynes. Of every 10 Brooklyn residents, it would be stunning if even one could recall the last time a Republican won a borough-wide race in Kings County. And Hynes’ chances seem even more, well, pitiful, when one considers that the man at the top of the Republican ticket, mayoral candidate Joseph Lhota, is trailing Democrat Bill de Blasio by a stunning 50-point margin in the most recent polls.

Since the primary, nearly all the major elected officials who once endorsed Hynes have pledged their loyalty to Thompson. Indeed, Thompson is now endorsed by Borough President Marty Markowitz and Sen. Charles Schumer and a cavalcade of others. Increasingly, Thompson is seen as a fresh source of new, progressive ideas and energy to an office that many suggest had become moribund and tired.

Rather than accepting the will of the people as expressed in a decisive primary result, Hynes is exhibiting a desperate desire to cling to power, no matter the odds. It is a sad and embarrassing postscript to what had been a largely impressive career for Hynes, a longtime Democrat. It’s a shame that Hynes made the choice to be divisive and self-serving rather than to stick with his initial instinct to be gracious.