HARRISBURG, Pa. — Former U.S. Sen. Arlen Specter, the outspoken Pennsylvania centrist whose switch from Republican to Democrat ended a 30-year career in which he played a pivotal role in several Supreme Court nominations, died Sunday. He was 82. Specter, who announced in late August that he was battling cancer, died at his home in Philadelphia from complications of non-Hodgkins lymphoma, said his son Shanin. Over the years, Arlen Specter had fought two previous bouts with Hodgkin’s disease, overcome a brain tumor and survived cardiac arrest following bypass surgery. Specter rose to prominence in the 1960s as an aggressive Philadelphia prosecutor and as an assistant counsel to the Warren Commission, developing the single-bullet theory that posited just one bullet struck both President Kennedy and Texas Gov. John Connally — an assumption critical to the argument that presidential assassin Lee Harvey Oswald acted alone. The theory remains controversial and was the focus of Oliver Stone’s 1991 movie “JFK.” In 1987, Specter helped thwart the Supreme Court nomination of former federal appeals Judge Robert H. Bork — earning him conservative enemies who still bitterly refer to such rejections as being “borked.” But four years later, Specter was criticized by liberals for his tough questioning of Anita Hill at Clarence Thomas’ Supreme Court nomination hearings and for accusing her of committing “flat-out perjury.” The nationally televised interrogation incensed women’s groups and nearly cost him his seat in 1992. Specter, who had battled cancer, was Pennsylvania’s longest-serving senator when Democrats picked then-U.S. Rep. Joe Sestak over him in the 2010 primary, despite Specter’s endorsements by President Barack Obama and other Democratic leaders. Sestak lost Specter’s seat to conservative Republican Rep. Pat Toomey by 2 percentage points. A political moderate, Specter was swept into the Senate in the Reagan landslide of 1980. He took credit for helping to defeat President Clinton’s national health care plan — the complexities of which he highlighted in a gigantic chart that hung on his office wall for years afterward — and helped lead the investigation into Gulf War syndrome. Following the Iran-Contra scandal, he pushed legislation that created the inspectors general of the CIA. As a senior member of the powerful Appropriations Committee, Specter pushed for increased funding for stem-cell research, breast cancer and Alzheimer’s disease, and supported several labor-backed initiatives in a GOP-led Congress. He also doggedly sought federal funds for local projects in his home state. The former Democrat was not shy about bucking fellow Republicans. In 1995, he launched a presidential bid, denouncing religious conservatives as the “fringe” that plays too large a role in setting the party’s agenda. Specter, who was Jewish, bowed out before the first primary because of lackluster fundraising. Despite his tireless campaigning, Specter’s irascible independence caught up with him in 2004. Specter barely survived a GOP primary challenge by Toomey by 17,000 votes of more than 1.4 million cast. He went on to easily win the general election with the help of organized labor, a traditionally Democratic constituency. Specter startled fellow senators in April 2009 when he announced he was switching to the Democratic side, saying he found himself “increasingly at odds with the Republican philosophy.” Earlier in the year, he had been one of only three Republicans in Congress — and the only one facing re-election in 2010 — who voted for President Barack Obama’s economic stimulus bill. He also said he had concluded that his chance of defeating a GOP challenger in the 2010 party primary was bleak. But he said the Democrats couldn’t count on him to be “an automatic 60th vote” to give the party a filibuster-proof majority. Specter outspent Sestak, a retired Navy vice admiral, but Sestak attacked him as a political opportunist who switched parties to save his job. A memorable campaign ad used Specter’s own words against him: “My change in party will enable me to be re-elected." Specter was diagnosed in February 2005 with stage IV Hodgkin’s disease, a cancer of the lymphatic system. Announcing the diagnosis with his trademark doggedness, Specter said: “I have beaten a brain tumor, bypass heart surgery and many tough political opponents and I’m going to beat this, too.” He wrote of his struggle in a 2008 book, “Never Give In: Battling Cancer in the Senate,” saying he wanted to let others facing similar crises “ought to know they are not alone.” Cancer handed him “a stark look at mortality” and an “added sense of humility,” Specter told The Associated Press. Intellectual and stubborn, Specter played squash nearly every day into his mid-70s and liked to unwind with a martini or two at night. He took the lead on a wide spectrum of issues and was no stranger to controversy. Born in Wichita, Kan., on Feb. 12, 1930, Specter spent summers toiling in his father’s junkyard in Russell, Kan., where he knew another future senator — Bob Dole. The junkyard thrived during World War II, allowing Specter’s father to send his four children to college. Specter left Kansas for college in 1947 because the University of Kansas, where his best friends were headed, did not have Jewish fraternities. He graduated from the University of Pennsylvania in 1951 and Yale law school in 1956. He served in the Air Force from 1951 to 1953. Friends say his childhood circumstances made him determined, tough and independent-minded. Specter considered his father’s triumphs the embodiment of the American dream, a fulfillment that friends say drove him to a career in public life. He entered politics as a Democrat in Philadelphia in the early 1960s, when he was an assistant district attorney who sent six Teamsters officials to jail for union corruption. After working on the Warren Commission, he returned to Philadelphia and challenged his boss, James Crumlish, for district attorney in 1965. Specter ran as a Republican and was derided by Crumlish as “Benedict Arlen.” But Crumlish lost to his protege by 36,000 votes. It was to be the last time until 1980 that Specter would win an election to higher office, despite three attempts — a 1967 bid for Philadelphia mayor, a 1976 loss to John Heinz for Senate and a 1978 defeat by Dick Thornburgh for governor. Specter lost re-election as district attorney in 1973 and went into private practice. Among his most notorious clients as a private attorney was Ira Einhorn, a Philadelphia counterculture celebrity who killed his girlfriend in 1977. Finally, in 1980, Specter won the Senate seat vacated by retiring Republican Richard Schweiker, defeating former Pittsburgh Mayor Pete Flaherty. After leaving the Senate in January 2011, the University of Pennsylvania Law School announced Specter would teach a course about Congress’ relationship with the Supreme Court, and Maryland Public Television launched a political-affairs show hosted by the former senator. He is survived by his wife, Joan, and two sons, Shanin and Steve, and four granddaughters.