Downing Street declined to rule out the use of retaliatory political action if the situation was not resolved quickly.
It has been reported last that UK officials are examining the potential to disrupt Spain's lucrative tourist industry as well as blocking its policy initiatives at the EU.
Pressed repeatedly on the potential for such action, a Number 10 spokesman told reporters at a Westminster briefing:
Our preference here is to resolve this via political means and through dialogue with the Spanish government.
Asked if Mr Cameron was confident of securing a swift resolution, he said: "We will do what we need to do to bring this to a satisfactory conclusion."
He said the Prime Minister wanted the EU to send monitors to the border "urgently".
We are still actively pursuing legal action. If we do pursue it, the first step would be for the European Commission to investigate the issue. That is why the Prime Minister spoke to President Barroso.
The Commission needs to meet its responsibilities to uphold EU law.