Trains were stopped at the border for hours - prompting Italy to launch an official complaint with France. Services were later resumed.
Italy has angered France by giving temporary resident permits to thousands of Tunisian migrants.
The permits allow them to travel freely in many European countries.
The Italian foreign ministry said the French move was "illegitimate and in clear violation of general European principles".
Speaking earlier on Sunday, Maurizio Furia, a spokesman for the Italian rail company, said that trains were not being allowed to pass into Menton, France, from the Italian border station of Ventimiglia.
The BBC's Hugh Schofield says a demonstration in support of the Tunisian immigrants had been planned, in which some 300 protesters had planned to ride what they dubbed "the train of dignity".
Because of the closure, the demonstration was unable to take place.
France has said migrants have to prove they can support themselves financially and has set up patrols on the Italian border.
But Italy says that France's actions are not in line with the EU's Schengen passport-free travel zone.
"We have given the migrants travel documents, and we gave everything (else) that is needed, and the European Commission recognised that, it has said that Italy is following the Schengen rules," Italian Interior Minister Roberto Maroni said in an interview on Italy's Sky TG24 TV.
Italy and other European countries have been increasingly concerned about migration from north Africa following the political turmoil in the region.
Earlier this month, Italy and France agreed to launch sea and air patrols to try to prevent the influx of thousands of people from Tunisia, Egypt and Libya.

Banks Renewables is behind the project close to Birneyknowe Cottage, south east of Hawick.
Planning officials had advised opposition due to its landscape, visual and cultural impact.
The size of the project means that the final decision on whether it goes ahead lies with the Scottish government.
The company has said the project would provide a Â£2.5m community benefit fund to support local groups and good causes.
Authorities in France temporarily blocked trains from Italy in an attempt to stop north African migrants from entering the country.
[NEXT_CONCEPT]
Councillors in the Borders have unanimously agreed to lodge an objection to a 15-turbine wind farm near Bonchester Bridge.