It came as the prime minister faces a major Commons revolt from two sides of his party over the planned new law.