A photovoltaic device (35; 41; 45), comprising: - a layered structure having a circumferential outer wall, a front surface for receiving optical radiation and a rear surface opposite to said front surface; - an electrical contact arrangement (21, 22); - a first semiconductor layer of a first conductivity type, said first layer extending adjacent to said front surface and having at least one electrical front contact connected to said contact arrangement; - a second semiconductor layer of a second conductivity type, said second layer extending contiguous to said first layer and having at least one electrical rear contact connected to said contact arrangement; - said first and second conductivity types being of opposite polarity such that said first and second layers (15, 16) are separated by a pn-junction, and - said first and second layer (15, 16) extending into said outer wall, characterized by - a passivating layer of a first type covering part of said outer wall comprised by a depletion region across said pn-junction; - a passivating layer of a second type covering at least part of said outer wall comprised by said first semiconductor layer, said passivating layer of said second type being contiguous to said passivating layer of said first type, and - a passivating layer of a third type covering at least part of said outer wall comprised by said second semiconductor layer, said passivating layer of said third type being contiguous to said passivating layer of said first type, wherein said passivating layer of said second type (32; 37) has an effective surface charge density of a type opposite and higher than said first layer and/or wherein said passivating layer of said third type (33; 38) has an effective surface charge density of a type opposite and higher than said second layer. - a layered structure having a circumferential outer wall, a front surface for receiving optical radiation and a rear surface opposite to said front surface; - an electrical contact arrangement (21, 22); - a first semiconductor layer of a first conductivity type, said first layer extending adjacent to said front surface and having at least one electrical front contact connected to said contact arrangement; - a second semiconductor layer of a second conductivity type, said second layer extending contiguous to said first layer and having at least one electrical rear contact connected to said contact arrangement; - said first and second conductivity types being of opposite polarity such that said first and second layers (15, 16) are separated by a pn-junction, and - said first and second layer (15, 16) extending into said outer wall, - a passivating layer of a first type covering part of said outer wall comprised by a depletion region across said pn-junction; - a passivating layer of a second type covering at least part of said outer wall comprised by said first semiconductor layer, said passivating layer of said second type being contiguous to said passivating layer of said first type, and - a passivating layer of a third type covering at least part of said outer wall comprised by said second semiconductor layer, said passivating layer of said third type being contiguous to said passivating layer of said first type,