The UK is to ask the European Court of Human Rights to review its absolute ban on deporting people to countries where they could face torture or death.
The attorney general said safety guarantees would be sought
The government wants to be able to take public safety into account when dealing with criminals from such nations, the Attorney General told the BBC.
But guarantees on returnees' safety would be sought, Lord Goldsmith said.
The comments come amid the row over the Home Office failure to consider foreign prisoners for deportation.
The European Convention on Human Rights was incorporated into UK law in 1998 through the Human Rights Act.
Lord Goldsmith said that the European Court of Human Rights ban arose from a ruling before the government came to power.
"That jurisprudence says you can't deport people where there is a serious risk of particular things happening to them - death, torture for example - without taking into account the security considerations at home," he told BBC Radio 4's Today programme.
"We are going to ask the European Court of Human Rights to look at that again.
"But we are also negotiating with countries in question, agreements, memoranda of understanding, so that we can give to the courts a good assurances that these people won't be mistreated."
On Wednesday, Tony Blair told the Commons the vast bulk of foreign prisoners should be deported whatever the dangers in their home nations.
Downing Street later said some prisoners could avoid deportation in "very few exceptional cases" such as a known threat to an individual.