LUXEMBOURG (Reuters) - The European Union’s top judge hit back at accusations that his court overstepped the mark with sweeping rulings imposed across the bloc, saying it was often left having to clear up vague legislation.

Responding to charges of judicial activism, after a series of cases involving high-profile companies including Google, Koen Lenaerts said the Court of Justice of the European Union could only speak on what was put in front of it.

The court was set up to make sure EU law was interpreted and enforced in the same way in all EU states - putting it at the heart of often hard-fought battles pitting the bloc against individual countries and companies.

“The ones who agree with our judgments say the court of justice is fantastic,” the Belgian jurist said in an interview at the Luxembourg court.

“Those who disagree with the judges say these judges are awful. (They say:) ‘They grabbed the power. They’re judicially activists ... and make the choices which we did not write into the text.’”

Lenaerts told Reuters many cases were only referred up to Luxembourg to clear up grey areas in EU legislation - often the result of political compromises among the 28 member states.

“The truth of the matter is, if the political process had come on further to the punch line of making the choices which need to be made, then our role would have been better boxed into a classical role of a judge,” he said.

Campaigners for Britain to leave the European Union before June’s Brexit referendum regularly accused the Luxembourg judges of using their powers to overrule national governments and force through greater European integration.

The court also came under fire from some activists after it ruled in 2014 that Google had to remove links to inaccurate or irrelevant information about people in its search results.

Activists said it would give rich people the power to force online companies to remove incriminating information.

But Lenaerts said the Court could not have gone beyond the case submitted to it by considering how the ruling affected the original publication of such information, or its storage in archives.

Similarly, the Court’s quashing of a framework relied upon by thousands of companies to transfer data between the EU and the United States in October 2015 was criticized for not giving businesses any time to adapt.

Lenaerts said rulings were limited to what was essential to solve a case, nothing more.

If courts requested a ruling on the compatibility of certain rules with EU treaties, he said, “we will speak out on that matter and not on five other issues not submitted to us, whatever our private opinion might be.”