WASHINGTON (AP) _ James B. Stockdale, the highest-ranking prisoner of war in Vietnam and later a Reform Party vice presidential candidate, says John McCain is ``solid as a rock'' and the harsh treatment he endured as a POW made him mentally stronger and more stable.

Stockdale said he was not surprised by assertions that the Republican presidential contender's flashes of temper are a sign he was psychologically affected by his POW experiences and may not be fit for the White House. Stockdale dismissed the idea.

``The military psychiatrists who periodically examine former prisoners of war have found that the more resistant a man was to harsh treatment, the more emotionally stable he is likely to become later in life,'' Stockdale wrote in an article Friday in The New York Times.

Stockdale, who ran as Ross Perot's running mate in 1992, said he got a call from a friend who is close to the GOP presidential campaign of Texas Gov. George W. Bush ``soliciting comments on Mr. McCain's 'weaknesses,''' although the Bush campaign has denied fanning the speculation.

``I think John McCain is solid as a rock,'' Stockdale said he told the caller, whom he didn't name. ``And I consider it blasphemy to smudge the straight-arrow prisoner-of-war record'' of McCain.

Stockdale, a retired Navy vice admiral, was a POW for eight years, half of them in solitary confinement. He said that at one point McCain replaced him in one particularly unpleasant structure.

McCain, critically injured when his plane was shot down during a bombing mission over Hanoi in 1967, was held 5 1/2 years until the end of the war and endured beatings that broke bones. The son of a Navy admiral, McCain refused an enemy offer to release him ahead of his fellow POWs.