Two boys have been charged with arson after a fire broke out at a library in Saint John.

The blaze broke out at the East Branch of the Saint John Free Public Library Monday night.

Fire officials say a customer at a nearby restaurant spotted it and quickly put it out with a fire extinguisher.

While the fire didn't cause any significant damage, the fire extinguisher used to douse the flames left many books and parts of the floor covered in residue.

Two 12-year-old boys have been charged with arson.

Fire officials say it's believed a paper cup was lit on fire and dropped through the book return slot.

Joann Hamilton-Barry, Saint John's city librarian, said there's always some concern about what's being put through that slot.

"You read about it in the library literature from time to time because it's an opening to the library. You know, our doors and windows are secure but we need to have a place for people to return their books, so it has happened in other libraries as well," she said.

Hamilton-Barry said the library has hired a professional cleanup crew to tidy up. They expect to be done late Wednesday afternoon.

All city libraries are closed Wednesday for a training seminar.

Police say the two 12-year-olds will appear in youth court on Oct. 29.