Two people have been shot and wounded in a mosque shooting in France, before the gunman was found dead.

The attacker opened fire as people left the mosque in Brest, western France - hitting the local imam and another person, officials said.

The imam, Rachid El Jay, was hit by four bullets while the other worshipper was wounded by two gunshots.

However, neither victim's life is said to be in danger.

A police source said the suspected shooter was found dead in an area near the airport, six miles from the mosque.

Police officers work at the site of a shooting incident outside a mosque in Brest (pictured in the background) that left two people including an imam injured

A police source said the suspected shooter was found dead in an area near the airport, six miles from the mosque (where police are pictured at the scene)

Brest prosecutor Jean-Philippe Recappe said the gunman opened fire as people left the mosque in the city's Pontanezen neigbourhood.

The victims were treated at the scene before being taken to an emergency room, police said.

They were also sprayed with water because of the extreme temperatures of the current French heatwave, it is reported.

It was not immediately clear whether the shooting was religiously motivated, a settling of scores, or motivated by other unknown factors, Recappe told Reuters.

Police have opened an inquiry, with the Paris prosecutor's office saying the situation was also being looked into by the anti-terror squad.

Writing on Twitter, interior minister Cristophe Castaner said he ordered for security to be heightened nationally around places of worship.

'I have asked local officials to step up security around places of worship across the country,' he wrote.

Emergency services at the scene where an attacker opened fire as people left the mosque in Brest, western France - hitting the local imam and another person