The government had warned the protesting trainee physicians that they could face administrative and legal penalties.