A gun instructor in southern France enraged at his neighbour for staging a noisy party went on a shooting rampage, killing two people and wounding two others, police said.

The 49-year-old man, an instructor at a shooting range, went to his downstairs neighbours in the town of Sete, asking them to turn down the music at the party they were hosting.

When they declined, he warned: "I am going to go home and I'll be back to kill you," according to local prosecutor Brice Robin.

The instructor made good on his promise at 2:00 am, bursting into the neighbours' apartment and opening fire on party goers, according to police.

When some of them fled the flat, he chased them, shooting one in the hallway of the building and the others in the street, police said.

One of the wounded managed to call the police before collapsing.

The gunman wounded three men and a woman, said Robin.

Later Saturday, he announced that two of the men injured, a 42-year-old and 36-year-old, had died.

The younger of the two men was the person who had rented the apartment.

A woman was reported to be in a critical condition.

A child who was sleeping in the apartment at the time escaped injury as did a couple who managed to hide under a table.

The gunman, described by neighbours as a loner, returned to his flat following the shooting, where he surrendered to police without resisting.

The man told police that he was on medication "because he hasn't been able to sleep" since his working hours changed 18 months ago, forcing him to get up at 4:00 am.

Police found six firearms during a search of his flat, including the one he had used, as well as 5,000 rounds of ammunition.

One police source said the gunman had in the past complained to his neighbour about noise.

[Image via Agence France-Presse]