XAPURI, BRAZIL, DEC. 12 -- The 22-year-old son of a local rancher stunned prosecutors, spectators and a newly picked jury today by suddenly confessing to the murder of ecologist and union leader Chico Mendes, but he maintained that his father, also accused, knew nothing about it.

The unexpected turn came barely an hour after the trial began. Darcy Alves spoke haltingly as Judge Adair Jose Longuini led him through a detailed description of the crime, which became a rallying point for ecologists around the world and brought a new focus to the battle over the fate of the Amazon basin.

Alves described entering Mendes' back yard through an open gate on the night of Dec. 22, 1988, and seeing the ecologist and union leader inside. When Mendes emerged, Alves fired at him once with a shotgun, he said, and then threw the gun into the Acre River and walked away.

He said his father, 56-year-old Darly Alves da Silva -- whom prosecutors have accused of directing the killing -- was unaware of his hasty decision to eliminate Mendes, with whom the family was involved in a bitter land dispute.

Prosecutors said Darcy Alves' description of the slaying was at odds with the physical evidence they have gathered, and charged that the sudden confession was a son's attempt to save his father.

"It is evident that the crime did not happen in the manner he says," said Marcio Tomas Bastos, a member of the prosecution team. "The object is clearly to save Darly."

Defense lawyers said even they were taken by surprise. Joao Lucena Leal, chief attorney for the defense, said that Darcy Alves told him only this morning that he intended to confess. Lucena Leal said he had entertained suspicions, but had finally decided that Darcy Alves was innocent -- until today.

"I asked myself many times whether I was a defense lawyer or a detective," Lucena Leal said, describing to reporters how the young man had given him different versions of the truth, and adding, "Darcy is crazy."

Darly Alves was out of the courtroom when his son confessed. The father then took his turn before the judge, and denied being involved with the killing or knowing anything about it except what he read in the newspapers.

The version told in court is similar to the one told by Darly and Darcy Alves when they were in jail shortly after the killing. Darly Alves maintained then that he was uninvolved. Darcy Alves then admitted the killing, and gave authorities a detailed description of how he did it.

But Darcy Alves later recanted the jailhouse version, professing that he was innocent, and the defense team alleged that the confession was coerced.

Defense lawyers said today's turnaround established Darcy Alves' guilt, and noted that the judge is obliged by law to be lenient in sentencing him because he was under 21 when he committed the crime. They maintained that most of the case that the prosecution had planned to present is now irrelevant.

But prosecutors said they believe Darly Alves had his son kill Mendes because he had blocked their attempts to clear a big patch of rain forest outside Xapuri. Ecologists and union leaders have seen the slaying as an example of the brutal way in which ranchers have sought to eliminate opponents like Mendes -- not only an ecologist, but also a labor organizer who championed the cause of landless rural workers.

Darcy Alves said he used a 16-gauge shotgun to kill Mendes and then threw the gun into the river, but prosecutors say that the crime was committed with a 20-gauge shotgun and that they have the weapon. Both the elder and the younger Alves said today that they had never seen the gun prosecutors displayed in court.

Prosecutors say that when Darcy Alves pulled the trigger, he was in the company of a ranch hand who worked with his father -- which would be an important indication of a conspiracy in which Darly Alves might have been involved. Authorities say he is still at large.

Darcy Alves said several times today that he was alone when he killed Chico Mendes. "It was my own decision," he told the judge. "My father never knew of this."

A jury of five men and two women had just been chosen and the courtroom had just settled down for what looked like a dull morning of preliminaries when the torpor was suddenly dispersed by one unexpected word. "Do you confirm or deny the charges?" the judge asked Darcy Alves.

"Confirm," the young defendant said.