Ronald Reagan, the 39th man to serve as president of the United States, is the ninth president to have been attacked by gun-wielding assailants.

Four presidents -- Abraham Lincoln in 1865, James A. Garfield in 1881, William McKinley in 1901 and John F. Kennedy in 1963 -- were killed by assassins' bullets. Five others -- most recently Gerald R. Ford, in September 1975 -- survived, some through alert security work and some through sheer luck.

In addition, Theodore Roosevelt, then a former president running for another White House term, was shot in the chest in 1912. In circumstances somewhat similar to yesterday's shooting, Roosevelt was shot as he left a hotel; the bullet was removed by surgery. Roosevelt maintained afterward that he had hardly noticed the attack.

At least two other presidential candidates -- Robert F. Kennedy in 1968 and George C. Wallace in 1972 -- were attacked on the campaign trail, both at close range by assailants carrying concealed handguns. Kennedy was killed; Wallace was paralyzed from the waist down and has been confined to a wheelchair since.

Despite the large number of candidates, there were few serious security incidents in either of the last two presidential elections. There was one moment early in the 1976 campaign that gave the Secret Service a scare, however. A candidate for the Republican presidential nomination was accosted by a man with a gun outside a hotel in Hollywood, Fla. The gun turned out to be a toy, and the assailant was hustled away. The candidate was Ronald Reagan.

The last serious attack on a president or candidate occurred on Sept. 22, 1975, as Ford was leaving a San Francisco hotel after giving a speech to the Building Trades Council of the AFL-CIO -- the same group Reagan addressed before he was shot yesterday.

Standing across the street from Ford's limousine that day was Sarah Jane Moore, a 45-year-old self-described "radical" who said she wanted to wage an "ultimate protest against the system." She fired toward Ford with a .38-caliber revolver. The shot went wild, and Moore was wrestled to the ground by bystanders. She is serving a life sentence at the federal prison in Alderson, W. Va.

That attack came 17 days after an attempt on Ford's life by Lynette (Squeaky) Fromme, a 26-year-old member of the "family" of followers of convicted mass murderer Charles Manson. As Ford was walking to the California State Capitol in Sacramento, Fromme aimed a Colt .45 pistol at the president. A Secret Service agent immediately grabbed Fromme's hand and no shot was fired.

Fromme is serving a life sentence in the same prison that holds Moore. In recent interviews, neither Moore nor Fromme has expressed regrets. "Given the politics of this country and my own situation, I have no problem with what I did," Moore said in an interview with the Associated Press last fall.

Fromme and Moore were the first women to attempt to shoot a president. Before their attacks on Ford, security experts had prepared a composite profile of the typical assassin. That information portrayed a white man, short and slender, with an early, unsatisfactory military record and subsequent difficulty at holding a job. Most assassins in American history, according to this profile, have acted out of personal frustration rather than political motivation.

That portrait almost exactly fits what is known about Lee Harvey Oswald, the Soviet and Cuban sympathizer who has been officially pronounced the murderer of John F. Kennedy. Kennedy was shot by a rifle during a motorcade through downtown Dallas on Nov. 22, 1963. Oswald was arrested for the killing, but he was shot to death at a Dallas police station two days later by Jack Ruby, a nightclub owner. Ruby was convicted of murder and died in prison.

The only assassination attempt in this country that seems to have had a clear political purpose came on Oct. 31, 1950, when a group of Puerto Rican nationalists tried to storm the doors of Blair House and kill then-President Harry Truman, who was living there while the White House was being repaired.

One of the attackers was killed by guards; the other, Oscar Callazo, was captured and sentenced to a life term. Callazo was freed after 28 years by a presidential grant of clemency in 1979.

On Feb. 15, 1933, President-elect Franklin D. Roosevelt was attacked in Miami by an emotionally disturbed bricklayer. The pistol shots missed the president but hit and killed Anton J. Cermak, who was the mayor of Chicago.

The first assassination attempt in U.S. history occurred in Washington in 1835, when President Andrew Jackson was accosted by a mentally disturbed house painter who fired two pistols at Jackson from six feet away -- and missed.

The first presidential killed in office was Abraham Lincoln, who was shot in the head on Good Friday in 1865 at Ford's Theater in Washington. Lincoln was slain by John Wilkes Booth, an actor who was part of a pro-southern conspiracy. Lincoln had avoided an earlier assassination attempt when detective Alan Pinkerton uncovered the plot and persuaded Lincoln to change his travel plans to thwart the conspirators.

James Garfield was killed in Washington by Charles Guiteau, who was angry that the president had not named him U.S. consul in Paris. William McKinley was murdered in Buffalo, N.Y., by Leon Czolgosz, who apparently was motivated by vague anarchist beliefs.