For the first time, the nation’s largest pediatricians’ group is saying it’s OK to allow children younger than two to be exposed to television, tablet and phone screens — with limits.

Since 1999, the American Academy of Pediatrics (AAP) guidelines for children’s media use has discouraged screen time for children under the age of two.

The updated guidelines — announced recently at an AAP conference — represents a notable shift in policy as doctors and families grapple with the challenges of raising healthy children in the digital age.

To be sure, the AAP discourages infants under the age of 18 months old from using screen media, except for when video chatting, for instance, with grandparents over Skype or FaceTime.

For children 18 to 24 months old, the doctors say screen time is fine — but only if it is being used for high-quality educational programs or apps such as Sesame Street and an adult caregiver is present while watching to interact with the child and reinforce what is being taught on screen.

“We all see kids in our clinics who if you hand them a phone they already know how to swipe. At that age, they’re like a sponge,” said Dr. Gigi Chawla, senior medical director for the primary care division at Children’s Hospitals and Clinics of Minnesota.

But there are health risks associated with giving children too much screen time — including sleep problems and obesity.

Chawla said the new policy strikes the right balance. “It is a blend of navigating how do we help counsel families on using media responsibly and in a way that they can be successful in this changing world.”

Other recommendations include: For children two to five, limiting media use to one hour or less per day; banning screens during meal times and one hour from bedtime, and keeping TVs and digital devices out of children’s bedrooms.

For more information, including an online tool to help families set media use goals, go here.