The European Commission said Spain should "optimise" its profiling system at the Gibraltar border "in order to reduce the large amount of random border controls".
However, the EU said the Spanish authorities had not broken any EU laws with its tight border checks.
"The Commission has not found evidence to conclude that the checks on persons and goods as operated by the Spanish authorities at the crossing point ... have infringed the relevant provisions of Union law," it said in a statement.
More top news
United in grief, the people of Manchester have come together in defiance to the suicide bomber who killed 22 people on Monday evening.
Hashem Abedi, who was held in Tripoli on the same day his father was arrested, was planning terror in the Libyan city, officials have said.
A notably mild night, feeling close and stuffy.