A Queens elementary school was evacuated yesterday after a natural-gas main broke, causing an explosion that sent smoke 10 stories into the air.

All 1,120 student at PS 107 in Flushing were rushed to a nearby playground while Con Ed fixed the pipe, which burst into flames at around 11:20 a.m. near 168th Street and 45th Avenue.

“We were just sitting in class and, all of a sudden, there was a loud noise,” said Victoria Crowe, 9, a fourth-grader.

“We ran to the window,” Victoria said. “They made an announcement that we had to leave the building.”

Nobody was hurt in the blast or the evacuation.

Several residents said the neighborhood has been plagued by natural gas odors. “They’re always fixing something on this block,” said Fred Hunt.

Con Ed said workers were repairing the pipe when it exploded.