NEW YORK (AP) — Former U.S. Sen. Joe Lieberman of Connecticut, who nearly won the vice presidency on the Democratic ticket with Al Gore in the disputed 2000 election and who almost became Republican John McCain’s running mate eight years later, has died, according to a statement issued by his family.

Lieberman died in New York City on Wednesday due to complications from a fall, the statement said. He was 82.

The Democrat-turned-independent was never shy about veering from the party line.

Lieberman’s independent streak and especially his needling of Democratic presidential nominee Barack Obama during the 2008 presidential contest rankled many Democrats, the party he aligned with in the Senate. Yet his support for gay rights, civil rights, abortion rights and environmental causes at times won him the praise of many liberals over the years.

Lieberman came tantalizingly close to winning the vice presidency in the contentious 2000 presidential contest that was decided by a 537-vote margin victory for George W. Bush in Florida after a drawn-out recount, legal challenges and a Supreme Court decision. He was the first Jewish candidate on a major party’s presidential ticket and would have been the first Jewish vice president.

He was also the first national Democrat to publicly criticize President Bill Clinton for his extramarital affair with a White House intern.

Lieberman sought the Democratic presidential nomination in 2004 but dropped out after a weak showing in the early primaries. Four years later, he was an independent who was nearly chosen to be McCain’s running mate. He and McCain were close pals who shared hawkish views on military and national security matters.

McCain was leaning strongly toward choosing Lieberman for the ticket as the 2008 GOP convention neared, but he chose Sarah Palin at the last minute after “ferocious” blowback from conservatives over Lieberman’s liberal record, according to Steve Schmidt, who managed McCain’s campaign.