The government's efforts to rush through emergency legislation to clean up politics tonight took a second knock in as many days as it was defeated in its attempts to make it easier to secure prosecutions in alleged cases of "cash for questions".

On the third and final day of debate on the parliamentary standards bill in the Commons, the government was defeated by three votes, 250 to 247, on plans to end "parliamentary privilege" and allow parliamentary debates to be used in court as evidence. John Reid, the former home secretary, voted against the government for the first time in his parliamentary career. Margaret Beckett, the former foreign secretary, was another rebel.

The justice secretary, Jack Straw, said he would "respect" the will of the house.But a government spokesman described the defeat as "scandalous" and accused Conservative MPs of a lack of will to reform. A Conservative spokesman said the vote was "a complete shambles" and insisted they supported other planks of the bill. The new legislation has been squeezed into the last three weeks of parliament's agenda, as the main parties push for new rules to reach the statute book before the summer. That would allow MPs to leave Westminster for the three-month summer break to work in their constituencies. But some have been unhappy at the crunched timetable for the bill and the attempt by the government to add new "legal" elements to the legislation.

Under the plans, the new Independent Parliamentary Standards Authority would oversee expenses claims and have powers to recommend fines or expulsion for MPs who break the rules.

On Monday night the government dropped plans which could have made a new code of conduct for MPs legally enforceable. On Tuesday the justice secretary dropped a further aspect of the bill, which would have legally required MPs to declare any "specified financial interest" before taking part in a debate in the Commons chamber. After the Labour backbencher Frank Field said he would rather go to jail than obey this, Straw announced he would drop that aspect.

Sir Stuart Bell, one of the Labour rebels, said: "When we kicked off we expected a bill that was going to get rid of the incestuous relationship between MPs and the Fees Office. But then the government added in all sorts of additional clauses that created new criminal offences.

"The problem was that we were seeing all privilege going to the courts as in the US where Congress gets challenged all the way to the supreme court.""

Today the cross-party justice select committee published a report warning ending parliamentary privilege would curb MPs' ability to speak freely on behalf of voters. Particularly damaging was evidence by the clerk of the house, Malcolm Jack, who warned the move would have a "chilling effect" on MPs and undermine parliamentary privilege. The concerns of the justice committee were shared by the human rights committee. Its chair, Andrew Dismore, said the parliamentary standards bill in its current form was incompatible with human rights laws, and MPs under investigation should have the "opportunity to be heard in person".