PROVIDENCE, R.I. (AP) — A new Rhode Island law is requiring elementary schools to give children at least 20 minutes of recess each day.

Democratic Gov. Gina Raimondo signed the school recess legislation into law on Monday.

The mandate takes effect immediately and requires schools to provide at least 20 consecutive minutes of free play.

The law also allows schools to treat recess as instructional time so that they don’t have to extend the school day to meet the requirement.

Parent groups had pushed for the recess mandate and had wanted to ban teachers from taking a child’s recess away as punishment. That ban was dropped in the compromise legislation that passed the state’s General Assembly this month, but the new law says teachers should make a good-faith effort not to withhold recess.