Gatineau police are warning parents to be careful after what appears to be a prescription pill was found mixed in with candy dispensed from a vending machine at an Aylmer shopping mall on Thursday.

Gatineau police say this candy capsule is similar to the one found containing a pill. (Gatineau Police)

Police were called to the the mall after someone made the discovery. The candy and pill were dispensed in a clear, plastic capsule.

Police are still trying to figure out what the pill actually is, but say preliminary testing shows it could have been hazardous if it had been swallowed.

The mall is now removing all of its similar candy vending machines. Police are visiting stores in the area to check their machines as well.

Investigators are now trying to figure our how the tablet got into the capsule in the first place.

Police are asking parents to check over candy purchased from vending machines before allowing their children to eat it.