Police in France fatally shot a man near Paris after he stabbed several people in a park, killing one person and wounding two more, a prosecutor said.

The attack happened on Friday in the town of Villejuif, about 8km (5 miles) south of central Paris.

The man's motives weren't immediately clear.

Police cordoned off the area, and ambulances and police vehicles lined a road approaching the park.

The two injured victims are being treated in nearby hospitals, Laure Beccuau, the prosecutor whose office is handling the case, told reporters.

"The suspect tried to attack other victims during his murderous spree ... [and they] were able to escape," she said.

The prosecutor declined to disclose details about the attacker. There was no indication of his identity or the motive for the attack.

Laurent Nunez, France's deputy interior minister, visited the scene and said the attacker would likely have hurt more people if police had not shot him when they did.

"It was an extremely courageous act," Nunez said.