Although mongooses exhibit compassion and intelligence (they can even be taught to do tricks), they often make for poor pets. Unless socialized from an early age, they are completely unsuitable for a domestic setting and may exhibit destructive behavior. Due to national laws and the challenge of rearing them, it would be difficult to even obtain one. Many countries also prevent people from importing them from elsewhere in the world. Therefore, it’s very rare for people to keep a mongoose as a pet and not recommended.
However, they were believed to be a common pet in ancient Egypt, with some tomb drawings showing mongooses on leashes. Mummified mongooses were also found in tombs with their owners, since it was common to bury pets for company in the afterlife.