Government 'unlawfully' tried to overrule parliament's intentions