NEW YORK (AP) _ A vaccine that makes the body attack sperm was 100 percent effective in tests with female and male guinea pigs, the first demonstration of contraception without fail from a vaccine, scientists reported today.

The study, which also found the effects of the vaccination temporary, raises the prospect that a similar vaccine might work in women and men.

But ''there are many things about it that would have to be changed or improved to make it a useful method for either agricultural animals or humans,'' said researcher Paul Primakoff.

The vaccine is designed to prevent fertilization, which may make it more widely acceptable than another vaccine already in human testing that stops development of the embryo, other scientists said.

Primakoff and colleagues at the University of Connecticut Health Center in Farmington, Conn., reported the experiment in the British journal Nature.

None of the 25 female guinea pigs that were vaccinated before mating had litters, nor did the mates of the six immunized male guinea pigs. Animals that received sham immunizations for comparison purposes remained fertile.

Eleven of 24 females tested had regained fertility by nine to 11 months after the immunization, and all four of the longest-studied group had delivered litters by 15 months. Among males, four of six had regained fertility by seven months after the immunization.

In a telephone interview, Primakoff said his team has since produced contraception in 17 other male guinea pigs.

The vaccine is designed to make the body's disease-fighting immune system attack a protein found in guinea pig sperm. The details of just how that blocks fertility in guinea pigs are not known, Primakoff said.

But immune system proteins called antibodies, taken from the immunized females, prevented sperm from binding normally to guinea pig eggs in the test tube. That suggests the vaccine blocks fertilization within vaccinated females, Primakoff said.

In males, the vaccination triggered an invasion of the testicle by immune system cells. That is ''not something you would want going on in your body'' because of the potential for long-term harm, Primakoff said.

So to produce a human male vaccine, researchers would have to find a way to trigger just the antibodies without the rest of an immune system reaction, he said.

No evidence indicates the guinea pig vaccine would work in humans, nor is there any assurance that human sperm contains a suitable protein target for a similar vaccine, he said.

Richard Bronson, director of the reproductive endocrinology division at the State University of New York at Stony Brook, called the research ''very encouraging.''

It suggests research into a sperm-targeting vaccine is ''heading in the right direction,'' he said.

The 100 percent contraception rate makes the results ''really terrific,'' said Nancy Alexander, director of applied fundamental research for the Contraceptive Research and Development Program at the Jones Institute of Reproductive Medicine in Norfolk, Va.

A vaccine that prevents fertilization might avoid religious and cultural implications of another kind of vaccine that has already begun preliminary human testing, she said.

That vaccine blocks the action of a hormone called human chorionic gonadotropin. Scientists are unsure whether the blocking prevents the blastocyst, a clump of cells that grows from a fertilized egg, from implanting itself in the uterus wall, or whether it prevents further development soon after implantion.

Implantation normally takes place six or seven days after the egg is fertilized.

Researchers overseas have shown the hormone-blocking vaccine is safe in humans and are preparing to start testing its effectiveness, Alexander said.