From the BBC:
The government has been defeated three times in the House of Lords over plans to allow ministers to order secret court hearings to consider evidence in cases relating to national security.Peers backed calls to give judges the say over the use of "closed material proceedings" by 264 votes to 159.
Critics say closed hearings are unfair to defendants and threaten the principle of open justice.
But ministers say intelligence which risks UK lives must not be disclosed.
The House of Lords is debating the Justice and Security Bill, which would ensure far greater use of so-called closed proceedings to examine sensitive intelligence and protect national security.
The BBC's deputy political editor, James Landale, said ministers had been braced for a number of defeats after a coalition of crossbench peers, led by QC Lord Pannick, joined forces with Labour and Liberal Democrat peers to introduce safeguards into the bill.
Peers backed Lord Pannick's call to give judges greater discretion to hold secret hearings, rather than obliging them to do so in national security cases, by a majority of 105.
Once again defying the government, peers voted by 273 to 173 to give judges and defendants, not just ministers, the right to demand closed material proceedings.After suffering a third substantial defeat on a related issue, ministers chose not to oppose a series of further amendments tabled by opponents.
As such, peers nodded through without a vote changes that would ensure that closed proceedings would be used only as a last resort, and only if the court also had considered using an existing mechanism allowing some proceedings to be secret, known as the public interest immunity system.
However, a backbench Labour-led amendment that would have removed the whole concept of secret hearings from the bill was defeated by 164 votes to 25, a government majority of 139, although Labour suggested many of its peers had abstained from voting because it would have contradicted earlier concessions.