Pernicious anemia is a type of megaloblastic anemia caused by a deficiency of vitamin B12. It is often associated with an inability to absorb this vitamin due to a lack of intrinsic factor, a protein produced by the stomach lining. The condition can lead to severe neurological complications if left untreated.