A schoolboy with a plastic gun dressed as Mr T sparked a terror alert in Nice, France, after police were called out to reports that a Kalashnikov wielding man was walking the streets.

Several witnesses reported seeing the gunman to police on Tuesday morning, reports the Local.

With tensions high following last month's terror attacks in Paris and a knife attack on three soldiers guarding a Jewish community centre in the city in February, police dispatched units to track down the A Team character lookalike, and scoured CCTV footage in an efforts to prevent another feared terror attack.

By late afternoon they had tracked down the culprit, who was a 17-year-old schoolboy carrying a plastic gun and dressed as Mr T for a party.

"Student disguised as BA Baracus didn't think of the consequences of his actions," police jokingly tweeted with a picture of the character, adding that he had been cautioned and his plastic gun confiscated.

The terror alert was raised to its highest level in the Riviera following the February 3 attack on the soldiers in broad daylight.

Moussa Coulibaly, 30, was arrested and charged with terrorism offences after the attack.