Sen. John McCain's ethics entanglement with a wealthy banker ultimately convicted of swindling investors was such a disturbing, formative experience in his political career that he compares the scandal in some ways to the five years he was tortured as a prisoner of war in Vietnam.

"I faced in Vietnam, at times, very real threats to life and limb," McCain told The Associated Press. "But while my sense of honor was tested in prison, it was not questioned. During the Keating inquiry, it was, and I regretted that very much."

In his early days as a freshman senator, McCain was known for accepting contributions from Charles Keating Jr., flying to the banker's home in the Bahamas on company planes and taking up Keating's cause with U.S. financial regulators as they investigated him.

Get Breaking News Delivered to Your Inbox

The Keating Five was the derisive name given McCain and four Democratic senators, including then-Sen. John Glenn of Ohio, who were defendants in a congressional ethics investigation of their connections to Keating. McCain is the only one still in the Senate. They were accused of trying to intimidate regulators on behalf of Keating, a real estate developer in Arizona and owner of Lincoln Savings and Loan based in Irvine, Calif.

Keating and his associates raised $1.3 million combined for the campaigns and political causes of all five. McCain's campaigns received $112,000.

The investigation ended in early 1991 with a rebuke that McCain "exercised poor judgment in intervening with the regulators." But the Senate ethics committee also determined McCain's actions "were not improper nor attended with gross negligence."

McCain has claimed the Keating scandal sensitized him even to the appearance of potential conflicts of interest. But in recent weeks, McCain has defended himself anew over another instance in which he intervened with federal regulators on behalf of a prominent campaign contributor - years ago but after the Keating rebuke. Again, McCain denies acting improperly.

McCain wrote two letters in late 1999 to the Federal Communications Commission on behalf of Florida-based Paxson Communications. He urged quick consideration of a proposal to buy a television station license in Pittsburgh, although he did not ask the FCC commissioners to approve the proposal. At the time, one FCC commissioner's formal nomination was pending before McCain's Senate committee, and the FCC chairman complained that McCain's letters were improper.

McCain wrote the letters after receiving more than $20,000 in contributions from the company's executives and lobbyists. Chief executive Lowell W. "Bud" Paxson also lent McCain his company's jet at least four times during 1999 for campaign travel.

In the Keating investigation, the committee said more than one year had passed - a "decent interval" - between the last contributions Keating raised for McCain and the two 1987 meetings he attended with banking regulators. McCain later paid $112,000 - the amount Keating raised for him - to the U.S. Treasury.

None of the five senators was punished by the Senate. The harshest rebuke went to Alan Cranston, D-Calif., who accepted $1 million in contributions tied to Keating. The ethics committee said Cranston "engaged in an impermissible pattern of conduct in which fundraising and official activities were substantially linked." Cranston died in December 2000.

The ethics committee said McCain took no further action on Keating's behalf after regulators dropped a bombshell during a meeting with the senators: They intended to recommend a criminal investigation of Keating and his savings and loan.

"The appearance of wrongdoing, fair or unfair, can be potentially as injurious as actual wrongdoing," McCain told the AP, reflecting on what he said were his lessons from the scandal. "Also, when questions are raised about your integrity or for that matter anything involving your public career, even, for example, a controversial position on the issues, it is best not to hide from the media or public."

Now famously accessible to reporters as a presidential candidate, McCain conducted a poisonous newspaper interview nearly 20 years ago with his hometown Arizona Republic. Flashing his quick temper, he insulted, cursed and hung up on reporters questioning him about his ties to Keating. He said he now recognizes it was the worst way to respond.

"Taking all the questions and making your arguments is the only way you can prevent an unfair or injurious public perception becoming fixed," McCain said.

Former Sen. Warren Rudman, R-N.H., a Republican on the ethics panel who investigated McCain, said McCain's political comeback and his personal rehabilitation from his time as a POW were his biggest personal obstacles.

"What happened in Vietnam and the Keating Five, those two were life altering," Rudman said in an interview. "He would not put a losing campaign in the same box. But not wallowing in self pity and doing something positive, that is absolutely John McCain."

Republican Trent Lott of Mississippi, the former Senate majority leader, said McCain's political revival after the investigation was no accident.

"He was so upset at the charges and the impact, he felt an extra need to deal with the kind of things that led to the situation he found himself in," Lott said in an interview. "You can go away disillusioned and angry and just leave, or you can go back to work and try to compensate for it. And that's what John has been about in the years since. He just went back to work. He bent over backwards to be extra careful about ethics."

Keating went to prison for more than four years after a federal fraud conviction. The conviction was reversed on appeal after he argued that jurors improperly had knowledge of a prior state conviction on related charges. He was to be retried in federal court but instead pleaded guilty to four federal fraud counts. Keating admitted he siphoned nearly $1 million from his S&L's insolvent parent company. He was sentenced to time he already had served.

After prison, Keating moved to his daughter's home in the wealthy Phoenix enclave of Paradise Valley. In 2006, he quietly began work as a business consultant in Phoenix. A spokesman for Keating, reached at his office, said Keating did not want to discuss the banking scandal or McCain's presidential campaign.

Keating's Lincoln Savings and Loan sold worthless, high-risk junk bonds. Many of the 23,000 investors were elderly customers who didn't realize their investments were not federally insured. Many were left destitute while Keating maintained a lavish lifestyle. Keating also participated in the risky investments that led to the collapse of S&L's across the country.

The U.S. government seized Lincoln in 1989, sticking taxpayers with a bailout cost of $2.8 billion. Many other thrifts collapsed, with taxpayers footing nearly $124 billion of the $152.9 billion bailout cost, according to the Federal Deposit Insurance Corp.

Depositors and politicians searched for culprits and turned up the five senators.

Keating sought a quid pro quo from the five. He wanted government regulators, who were investigating Lincoln, off his back. And he demanded reversal of a new rule limiting an S&L's direct investment in risky ventures to 10 percent of assets.

The banker's attitude was summed up the day a reporter asked whether his political donations to the senators encouraged their intervention.

"I want to say in the most forceful way I can, I certainly hope so," Keating replied.

But McCain had an additional image problem beyond the intervention and his acceptance of Keating's cash. The two former Navy pilots had become good friends, until the day Keating decided McCain wasn't doing enough for him and called the Arizona senator a wimp. Keating had flown McCain and his family on several occasions to his home in the Bahamas and other locations.

When his company tried to take tax deductions for the trips, the IRS raised questions. McCain, who said he mistakenly thought his wife had reimbursed the cost, paid back more than $13,000 - years after the trips and after the senator knew of Keating's problems with the government.

McCain, in his book "Worth the Fighting For," lamented that the senators "were now a two-word shorthand for the entire savings and loan debacle and the rotten way American political campaigns are financed."

He also wrote: "My popularity in Arizona was in free fall. ... I expected a rough, and quite possibly unsuccessful re-election campaign in 1992. To the extent I was known nationally anymore, it was as one of the crooked senators who had bankrupted the thrift industry."

McCain was re-elected in 1992 with 56 percent of the vote.