Firefighters battled a blaze next to a school on the Upper East Side.

Crews say flames broke out on the roof of a building on East 83rd Street near Madison Avenue just after 2 p.m. Tuesday.

Firefighters were able to get it under control in about half an hour.

Students and staff from the Loyola School were evacuated as a precaution and no one was injured.

The cause of the fire remains unclear.