A Vancouver daycare has taken the unusual step of keeping kids indoors after improperly stored compost led to an infestation of rats in the area.

The YMCA daycare on Burrard Street near Beach Avenue found out about the rats on Thursday. It was later discovered that somebody dumped compost and food scraps out in the open in a community garden behind the daycare.

"Since the safety of children in our care is the YMCA's top priority and rats aren't known to be the cleanliest of pets, we are keeping children away from the outdoor play area until we have a high degree of confidence that the pests are no longer an issue," a YMCA spokesperson said in a statement.

The city agreed with the move, and said it is doing everything it can to resolve the problem.

“I think there could be a risk if a kid is getting bitten, so I think it’s prudent for the Y to keep the kids away,” said Albert Shamess, Director of Waste Management for the City of Vancouver.

Shaness was quick to point out the compost in the garden is not part of the city’s official green bins program, and said those bins feature tight-fitting lids to keep rodents at bay.

“We haven’t had any problems with rats in the program at all,” he told reporters outside the daycare.

City crews are now working to clear the food scraps from the area, and exterminators have been called in to dispatch the critters.

Parents with children in the daycare are hoping the problem will be fixed soon.

“Kids are very active and they always want to play, they have 24 hours of energy,” said Belinda Kennedy, who has a young daughter in the school. “They do let them outside twice a day, usually…but I haven’t been aware that this has been going on.”

Shamess was quick to point out that the rats were likely already in the area, but the compost brought them all to the same place.

“I don’t think the rats are here because of the compost. I think the fact that there was compost here allowed them to congregate in this location,” he said. “You don’t want to put food scraps in your backyard composter because it is going to attract rats.”

With summer officially approaching, the city hopes to have the problem fixed so the daycare can allow children outside again. Pest control will service the area twice a week, the YMCA said.

With a report from CTV Vancouver's Scott Roberts.