The police then began towing away vehicles and debris and authorities announced the reopening of the road to traffic hours later.
The police action led to some scuffles, and some protesters could be seen crying from the effects of the spray. The regional administration said no one was injured in the operation, which took all morning.
The planned three-day protest started Monday. It was organized by a clandestine activist group called Tsunami Democratic, which has staged many protests, some violent, since a dozen Catalan separatist leaders were convicted last month for their role in a 2017 push to make Catalonia independent from Spain.
The A9-AP7 highway connects Perpignan in France with Barcelona in Spain and is a key thoroughfare for trade and tourism between the countries. Thousands of vehicles had been sent on detours through the Pyrenees to try to cross the border elsewhere.