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
They wanted it - all power to British courts. Now they've got a taste of what it means. And they might not like it.
The Hollywood star refused to appear on ITV's Good Morning Britain because of host Piers Morgan's comments about the women's marches.
The former Ukip leader has torn into the Labour leader as he backed his successor Paul Nuttall to claim the vacant Stoke Central seat.