The government has been defeated in the Lords over the future possible transfer of responsibility for counter-terrorism from the Metropolitan Police to the new National Crime Agency.
Under the government's plans, ministers would be able, at some unspecified time in the future, to go ahead with the transfer through order-making powers requiring only limited debate.
But peers agreed by a 21-vote majority to remove the relevant clause from the Crime and Courts Bill, during report stage of the legislation on 27 November 2012.
Former Met Police chief Lord Blair of Boughton argued that the change should not be allowed to proceed without primary legislation and full parliamentary scrutiny.
Home Office minister Lord Taylor of Holbeach said no decision had been made on transferring responsibility for counter-terrorism from the Met.
"It's not going to be sprung as a surprise on an unwitting Parliament," he said, telling peers any change would only be after a review and public debate.
However, peers went on to approve the opposition-led amendment by 222 votes to 201.
The National Crime Agency (NCA) will replace the Serious and Organised Crime Agency and UK Border Agency in investigating organised and complex crime and enhancing border security.
It will also have the power to tackle cyber-crime and the sexual abuse and exploitation of children.
Earlier in the debate peers raised concerns about the governance of the agency.
Labour put forward an amendment that would see the NCA governed by a separate board with an independent chair.
Baroness Smith of Basildon explained that the director general would remain in charge of the agency's operational and administrative functions, but would be directly accountable to the board rather than the home secretary.
The would offer an "additional layer of scrutiny" and protect the home secretary from accusations of political interference, she argued.
Liberal Democrat Baroness Hamwee proposed her own amendment calling for a "supervisory board", to be chaired by the secretary of state.
Lady Hamwee told peers this did not go as far as Labour's amendment because it would not change the "architecture of the bill".
But Home Office Minister Lord Taylor of Holbeach said the amendments would undermine the "clarity" of governance arrangements set out in the bill and would introduce an "unnecessary" layer of bureaucracy.
The amendments were withdrawn without a vote.