Two MPs are to sue the Government over the introduction last week of the controversial Data Retention and Investigatory Powers Act (Drip), which gives police and security services access to people's phone and internet records.
Conservative former shadow home secretary David Davis and Labour backbencher Tom Watson are applying for a judicial review of the Act, which was rushed through Parliament in just three days with the backing of all three major party leaders.
Backed by civil rights group Liberty, they will ask for a declaration from the High Court in London that the Act is not compatible with Article 8 of the European Convention on Human Rights, which guarantees the right to a private life.
The MPs have written to the Home Office giving them seven days' notice of their intention to seek judicial review next week. If successful, the case - which could be heard in the autumn or early next year - would not strike down the Act but would require the Government to take action to ensure it is compatible with human rights law.
Prime Minister David Cameron and Deputy Prime Minister Nick Clegg said that the accelerated passage of Drip through Parliament was necessary because of an emergency created by a ruling in April by the European Court of Justice, which they said would have the effect of denying police and security services access to vital data about phone and email communications.
They insisted that the Act would simply maintain existing powers, which required communications companies to retain data for 12 months for possible investigation, but do not allow police or security agencies to access the content of calls or emails without a warrant.
Announcing the plan to seek judicial review, Mr Davis said: "Last week was a constitutional scandal. A piece of fundamental legislation was put through without proper scrutiny - without any real scrutiny.
"We were told it was simply reinstating the policy, but that is disingenuous. It was reinstating a policy which had been struck down by European law, without doing anything to make right the flaws which led to it being struck down, and it was reinstating policy which had fallen into very serious disrepute."
Mr Watson said that the deal between the three party leaders to rush Drip through Parliament amounted to "effectively making secret law, because most MPs didn't have the capacity or time to properly understand or scrutinise the legislation".
"We've been left with no option but to take the legal route," he said.
"The fact that the state at any time can find out almost your exact whereabouts, if you are carrying a mobile phone, I think is disproportionate and breaches the fundamental right to privacy."
Liberty director Shami Chakrabarti said that, in striking down the EU directive upon which previous data retention powers were based, the ECJ had suggested 10 safeguards which might improve the law - including measures to limit the period for which records are kept or to exempt specific professions, such as lawyers and MPs, from surveillance of this kind.
She said it was particularly appropriate that MPs were leading the legal fight, as their communications can be expected to include sensitive details relating to constituents' private lives.
Describing the passage of Drip as "a complete disgrace", she said "In response to a three-month-old ECJ decision, the Government stitched up a private deal between three party leaders and allowed Parliament only three days to scrutinise this so-called emergency legislation.
"The fightback begins this week."
Mr Cameron's official spokesman told a regular Westminster media briefing: "We will respond to any proceedings in that area in the usual way.
"Clearly, it is now an Act of Parliament and we will respond to anything in that area on that basis."
Martyn Thomas from the Institution of Engineering and Technology (IET) said: "In principle, the proposals are important for national security and law enforcement. It is essential that any intrusion into a citizen's private affairs is minimal, proportionate to the benefits to society as a whole, and properly controlled and supervised.
"Hasty legislation has often proved to be badly flawed."