PARIS — A French farmer who smuggled migrants across the Italian border was sentenced on Tuesday to a suspended four-month prison term in a case that has shone a light on the government’s immigration policies.

The farmer, Cédric Herrou, an olive grower who lives in the Roya Valley in southeastern France, said after the sentence was handed down that he would continue to help African migrants crossing from Italy to seek asylum in France, or to travel farther north to other destinations, like Britain or Germany.

Mr. Herrou was convicted in February by a lower court in Nice, which gave him a suspended fine of 3,000 euro, or about $3,500, meaning he did not have to pay if he stayed out of trouble for five years.

The same mechanism will apply to the four-month sentence, which was handed to him by an appeals court in Aix-en-Provence. The prosecutor in Nice, who had requested an eight-month prison term at Mr. Herrou’s initial and highly publicized trial, had appealed the February sentence because he believed it was too lenient.