The Ministry of Magic employed Dementors as the guards of Azkaban prison, until mid-1996, when Lord Voldemort was sighted in the Ministry, and their defection to his side was realised. The Dementors supposedly led the Death Eaters and Lord Voldemort into the Ministry of Magic. After the end of the Second Wizarding War in 1998, the Ministry was reformed, and Minister for Magic Kingsley Shacklebolt ensured that they were not used by the government again.
There are certain defenses one can use against Dementors, specifically the Patronus Charm. Dementors hold no true loyalty, except to whomever can provide them with the most people to feed off. They cannot be destroyed, though their numbers can be limited if the conditions in which they multiply are reduced, implying that they do die off eventually.