MPs Tom Watson (L) and David Davis believe Dripa is incompatible with human rights. Getty

Labour's Tom Watson and the Conservatives's David Davis are attempting a High Court challenge against the government's emergency surveillance law.

The MPs are challenging the Data Retention and Investigatory Powers Act (Dripa), passed by the coalition government last year, which gives police and security services access to people's phone and internet records.

The legislation was backed by all three main political party leaders last July and passed through parliament in three days.

The MPs, along with civil rights group Liberty, believe the act is not compatible with a section of the European Convention on Human Rights (ECHR), which gives the right to respect privacy as well as the protection of personal data.

The hearing at the Royal Court of Justice is due to last two days.

Prime Minister David Cameron and then deputy PM said Nick Clegg said it was necessary to quickly pass through Dripa after the European Court of Justice made a ruling that would have denied authorities access to vital data about phone and email communications.

The act passed on the basis that communications companies keep data for 12 months in case they are needed for an investigation, but did not allow police or security services access to the data without a warrant.

Watson, MP for West Bromwich East, said: "The government's decision to use emergency powers to enable it to spy on citizens shows the rights of the individual need to be strengthened to ensure the state can't act with impunity.

"Even MPs are powerless to prevent such powers being enacted. The Human Rights Act allows us to challenge those powers in the courts but the Tory government is intent on tearing up the act and doing away with the limited legal protection it affords. It is vital that we fight for it to be retained."

Emma Norton, legal officer for Liberty, added: "The executive dominance of parliament in rushing through this legislation – using a wholly fabricated 'emergency' – made a mockery of parliamentary sovereignty and the rule of law, and showed a staggering disregard for the entire population's right to privacy.

"It is thanks to the Human Rights Act that we are able to challenge the government's actions – the same government which now seeks to axe that very piece of legislation and, by doing so, curb the British people's ability to do so in future."

Liberty said it is not against phone and internet data being used to solve or prevent crime, but does not believe it "justifies the costly and lengthy mass retention of records of those who are not involved in such investigations".