Ahlfors and Beurling [16] proved that set ๐ธ is removable for class ๐ด๐ท2 of analytic functions with the finite Dirichlet integral if and only if ๐ธ does not change extremal distances. Their proof uses the conformal invariance of class ๐ด๐ท2, so it does not immediately generalize to ๐ ฬธ= 2 and to the relevant classes of harmonic functions in the space. In 1974 Hedberg [19] proposed new approaches to the problem of describing removable singularities in the function theory. In particular he gave the exact functional capacitive conditions for a set to be removable for class ๐ป๐ท๐(๐บ). Here ๐ป๐ท๐(๐บ) is the class of real-valued harmonic functions ๐ข in a bounded open set ๐บ โ ๐
๐, ๐ โฅ 2, and such that โซ๏ธ ๐บ |โ๐ข|๐ ๐๐ฅ < โ, ๐ > 1. In this paper we extend Hedbergโs results on class ๐ป๐ท๐,๐ค(๐บ) of harmonic functions ๐ข in ๐บ and such that โซ๏ธ ๐บ |โ๐ข|๐ ๐ค๐๐ฅ < โ. Here a locally integrable function ๐ค : ๐
๐ โ (0,+โ) satisfies the Muckenhoupt condition [20] sup 1 |๐| โซ๏ธ ๐ ๐ค๐๐ฅ โ โ 1 |๐| โซ๏ธ ๐ ๐ค1โ๐๐๐ฅ โ โ ๐โ1 < โ, where the supremum is taking over all coordinate cubes ๐ โ ๐
๐, ๐ โ (1,+โ) and 1 ๐ + 1 ๐ = 1; by โ๐(๐) = |๐| we denote the ๐-dimensional Lebesgue measure of ๐. We denote by ๐ฟ1 ๐ , ห ๐ค(๐บ) the Sobolev space of locally integrable functions ๐น on ๐บ, whose generalized gradient in ๐บ are such that โ๐โ๐ฟ1 ๐ , ห ๐ค(๐บ) = โ โ โซ๏ธ ๐บ |โ๐|๐ ห ๐ค๐๐ฅ โ โ 1 ๐ < โ, where ห ๐ค = ๐ค1โ๐. The closure of ๐ถโ 0 (๐บ) in โ ยท โ๐ฟ1 ๐ , ห ๐ค(๐บ) is denoted by โL 1 ๐, ห ๐ค(๐บ). For compact set ๐พ โ ๐บ (๐, ห ๐ค)-capacity regarding ๐บ is defined by ๐ถ๐, ห ๐ค(๐พ) = inf ๐ฃ โซ๏ธ ๐บ |โ๐ฃ|๐ ห ๐ค๐๐ฅ, where the infimum is taken over all ๐ฃ โ ๐ถโ 0 (๐บ) such that ๐ฃ = 1 in some neighbourhood of ๐พ. Note that ๐ถ๐, ห ๐ค(๐พ) = 0 is independent from the choice of bounded set ๐บ โ ๐
๐. We set ๐ถ๐, ห ๐ค(๐น) = 0 for arbitrary ๐น โ ๐
๐ if for every compact ๐พ โ ๐น there exists a bounded open set ๐บ such that ๐ถ๐, ห ๐ค(๐พ) = 0 regarding ๐บ. To conclude, we formulate the main results. Theorem 1. Compact ๐ธ โ ๐บ is removable for ๐ป๐ท๐,๐ค(๐บ) if and only if ๐ถโ 0 (๐บ โ ๐ธ) is dense in โL 1 ๐, ห ๐ค(๐บ). Theorem 2. Compact ๐ธ โ ๐บ is removable for ๐ป๐ท๐,๐ค(๐บ) if and only if ๐ถ๐, ห ๐ค(๐ธ) = 0. Corollary. The property of being removable for ๐ป๐ท๐,๐ค(๐บ) is local, i.e. compact ๐ธ โ ๐บ is removable if and only if every ๐ฅ โ ๐ธ has a compact neighbourhood, whose intersection with ๐บ is removable. Theorem 3. If ๐บ is an open set in ๐
๐ and ๐ถ๐, ห ๐ค(๐
๐ โ๐บ) = 0. Then ๐ถโ 0 (๐บ) is dense in โL 1 ๐, ห ๐ค(๐
๐).