A proposed law requiring the UK to recognise a Palestinian state has attracted support in Parliament, amid warnings it would act as a “licence for further terrorism”.