Opposition said agreement with Trump administration was potentially illegal while government hardliners cast it as a betrayal