The House of Lords has rejected an outright ban on smacking children, and backed a compromise allowing parents to resort to "mild smacking".
Parents could be prosecuted if they cause 'actual bodily harm'
The government had urged peers to reject a total ban on the grounds that it would criminalise parents who smack their disobedient children.
Causing bruises, reddening of the skin and mental harm will become a criminal offence in England and Wales.
Campaigners for an outright ban said the compromise was "a fudge".
But opponents of the planned law change said it would lead to authorities "snooping into the lives of normal families".
The compromise amendment, supported by the government, was drafted by Liberal Democrat Lord Lester of Herne Hill.
Voting was 226 to 91 in favour of a compromise.
Labour peer Lord Peston called the government's decision not to grant a free vote on the total ban, rejected 250 to 75, "shameful".
Senior Labour MP David Hinchliffe immediately announced he would push for an outright ban once the bill reaches the Commons.
He said he had the support of 100 backbenchers and a "significant" number of ministers.
"I genuinely hope the government will have the common sense to allow a free vote and not whip it," he said.
"If this is not an issue of conscience, I don't know what is."
Mr Hinchliffe chairs the health select committee which first called for the ban on smacking.
BBC political correspondent Mark Mardell said the bill was likely to have a "smooth ride" through the House of Commons.
However, there would be "grey areas" in the legislation, he said.
"The lawyers, the police, the juries will be all over this and they will all have different interpretations," he said.
Shadow secretary of state for the family Theresa May said there was no point to legislation which may prove to be
"Who will decide what constitutes an acceptable smack and one which breaks
the law?" she said.
"We do not want to see parents, often bringing children up in difficult
circumstances - made into criminals for doing what they believe to be in the
best interests of their families."
Downing Street's position is that a full ban on smacking would represent an unacceptable intrusion into family life which would inevitably lead to parents ending up before a judge for minor slaps.
Prime Minister Tony Blair explained the government wanted to strike a balance between protecting children and parents' rights to discipline their children.
The compromise was also backed by Lord Laming, who led the inquiry into the death of Victoria Climbie, an eight-year-old who died from the abuses and tortures inflicted by her great aunt and her partner.
"We would all like every parent to have the skills and ability not to have to resort to physical punishment," he told BBC Radio Four's The World at One programme.
During the three-hour debate leading to the vote in the House of Lords, Liberal Democrat Baroness Walmsley begged peers to vote in favour of the full ban.
She said Britain's "culture of violence" was rooted in the acceptance that children could be smacked.
"The whole country seems to think that violence solves things," she said.
"It doesn't. The terrible situation in Iraq should teach us that."
Lady Walmsley belongs to a cross-party coalition led by Baroness Finlay of Llandaff, a crossbencher, which argued that the current law allowed parents to get away with domestic violence.
Tony Samphier of the anti-smacking Children Are Unbeatable! alliance, said the outcome of Monday's vote was "shameful, unjust and irresponsible".
"Peers who voted against equal protection have failed children," he said.
"But this is not the end of the campaign - it is just the start."