The discovery was made early Thursday in a Palestinian village, Bita Al Fuka, near Nablus, Ynetnews reported.
A group of soldiers and a canine unit carried out a raid at the home of a Palestinian suspected of terrorist activities.
As the Israeli soldiers started to leave the building with the suspect in custody, the dog would not follow.
The dog's master then followed the animal to a bedroom where the firearm and ammunition had been hidden inside a mattress.
NBC reportedly holds celebs hostage to Jimmy Fallon's show
Ray Liotta sues skin care company over use of likeness