Peers have backed a proposal that would require Theresa May to proceed with the second stage of the Leveson inquiry.
Crossbench peer Baroness Hollins had tabled an amendment to the Data Protection Bill currently going through Parliament. She was backed by 238 votes to 209, defeating the government.
Stage two would examine unlawful action by media organisations, plus relations between journalists and the police.
New Culture Secretary Matt Hancock said it would be an attack on press freedom.
Lord Leveson was appointed by David Cameron in 2011 to chair an inquiry into the conduct of the press in the wake of phone hacking allegations against the News of the World.
In his original terms of reference, it was envisaged the inquiry would be split into two parts. The first, looking at the culture and practices of the press and relations between politicians, press and the police, took place in 2011 and 2012, with a full report in November 2012.
The second part, which has yet to take place, was scheduled to consider the extent of improper conduct and governance failings by individual newspaper groups, how these were investigated by the police and whether police officers received corrupt payments or inducements.
But in their election manifesto last year, the Conservatives said that it no longer planned to proceed with this part of the inquiry.
The party said Lord Leveson’s initial inquiry had been sufficiently “comprehensive”.
It also pointed to the lengthy investigation by the police and Crown Prosecution Service into alleged wrongdoing by newspaper journalists, which led to a series of criminal trials.
However, tabling her amendment, Baroness Hollins suggested victims of crime had been “promised” a second phase to the inquiry and it was a matter of “good faith” that it should be honoured.
She said she had no idea what terms such as hacking and blagging meant before she was a victim of press intrusion after her daughter Abigail Witchalls was seriously injured during an attack in 2005.
“First, there is the sheer scale of unlawful conduct and the lack of any accountability,” she said.
“Secondly, there are the traumatic consequences for the many ordinary people who are victims. Thirdly, there are the ongoing implications for the conduct of powerful press organisations today.”
Labour and Liberal Democrat peers welcomed the move, with former minister Lord McNally claiming government objections were “a bogus smokescreen to try and shield press barons from independent oversight”.
In his report, Lord Leveson recommended the setting up of a new press regulator backed by statute.
During Wednesday’s debate, peers also backed – by 211 votes to 200 – a controversial measure that would see newspapers not signed up to the regulator pay their own and their opponent’s legal costs in relation to alleged data protection breaches, even if they were successful in court.
Mr Hancock, who was appointed on Monday, said he would seek to overturn both proposals when the bill – which will bring the EU’s general data protection regulation into UK law, reaches the Commons.