The criminal court in New Caledonia has jailed a 23-year-old man for four years for firing at police trying to intervene in a dispute on the island of Ouvea last month.
Les Nouvelles Caledoninnes reports that another 10 months have been added to his sentence because he failed to adhere to the terms of two previous suspended sentences.
The gunman had both fired at a police vehicle and at the police station, but nobody was hurt.
In court, the gunman apologised to the police, blaming his action on alcohol and cannabis.
New Caledonia has the highest incidence of armed attacks on the police of any part of France.