The director of the civil rights group Liberty, Shami Chakrabarti, applauded the vote but repeated her condemnation of top Metropolitan Police officers who lobbied intensively for the law change.
The defeat in the Commons had been far more decisive than she could have dreamed of, she added.
"We are greatly heartened by this, despite concerted attempts to turn this into an issue of party tribalism and concerted political campaigns by senior policemen," Ms Chakrabarti said.
"It's restored a little bit of trust in politicians in Parliament."
However, she expressed concern at the fact MPs had backed a doubling of the detention period to 28 days from the current 14 days.
Asked if she was surprised by the 31 majority against the Government on the 90-day proposal, she said: "Yes. I was feeling a bit pessimistic and that it would be a lot closer."
She said interventions by senior officers such as Met Commissioner Sir Ian Blair and anti-terror chief Andy Hayman to persuade MPs to back the clause had been "highly inappropriate".
"The politicisation of these officers is very troubling - almost as troubling as the proposals contained in this Bill," she said.Reuse content