SAO PAULO, Brazil - A Brazilian judge has convicted two American pilots for their role in a 2006 airline crash that killed 154 people, but he ordered them to perform more than four years of community service in the United States instead of going to prison.

Federal Judge Murilo Mendes ruled that pilots Joseph Lepore of Bay Shore, N.Y., and Jan Paladino of Westhampton Beach, N.Y., were negligent for not verifying that anticollision equipment and a device that would have alerted controllers to their location were functioning in the executive jet they were flying. Both have denied that accusation.

Mendes sentenced them late Monday to four years and four months in prison but commuted the sentence to the same amount of time performing unspecified community service in the United States. He also said their pilots' licenses were suspended for the community-service period, but it was not clear whether that order would be valid outside Brazil.

Controllers, pilots, judges, and aviation officials have bitterly disputed the failures that led to the crash, one of Brazil's worst air disasters.

The Americans were piloting a Embraer Legacy 600, flying it from its manufacturer in Brazil to its new owner, ExcelAire Service Inc. of Ronkonkoma, N.Y., when it collided over the Amazon rain forest with a Gol Airlines Boeing 737. The Embraer landed safely; the 737 crashed into the jungle, killing everyone aboard.

Lepore and Paladino faced charges in Brazil of negligence and endangering air traffic safety for allegedly flying at the wrong altitude and failing to turn on their jet's anticollision system. They were convicted of impeding the safe navigation of a plane.

Theo Dias, a Brazilian lawyer for the American pilots, told G1, the website of the Globo TV network, that he would appeal the ruling. Dante D'Aquino, an attorney for a group of family members of those killed, said he would also appeal, but for a tougher sentence.

Neither Lepore nor Paladino was in Brazil for the ruling.

The U.S. National Transportation Safety Board has attributed the collision mostly to shortcomings in Brazil's military-run air traffic control system. In October, a military court sentenced controller Jomarcelo Fernandes dos Santos to 14 months in prison for failing to act when he saw that the Legacy's anticollision system had been turned off. Four other controllers were acquitted for lack of proof.