Pericarditis is due to inflammation and swelling of the pericardium, a thin sac-like membrane that surrounds the heart. It often causes chest pain and sometimes accompanies other symptoms. Pericarditis is usually sudden and temporary. When symptoms develop more gradually or persist, the condition is considered chronic.