A method of manufacturing an electromechanical device having mechanical structures (20a, 20b, 20c, 20d) and an electrical contact, both overlying a substrate, wherein the mechanical structures (20a, 20b, 20c, 20d) reside in a sealed chamber, the method comprising: providing a substrate with a first sacrificial layer, an electrical contact and mechanical structures (20, 20b, 20c, 20d), wherein the electrical contact and the mechanical structures (20a, 20b, 20c, 20d) are both disposed on the first sacrificial layer; depositing a second sacrificial layer over the mechanical structures (20a, 20b, 20c, 20d) and at least a portion of the electrical contact, directly covering the mechanical structures (20a, 20b, 20c, 20d) and the portion of the electrical contact; forming an opening into the second sacrificial layer, wherein the opening is positioned in a portion of the second sacrificial layer which covers the electrical contact; depositing a first encapsulation layer over the second sacrificial layer filling up the opening for forming a contact via, wherein the first encapsulation layer consists of a semiconductor material; forming at least one vent through the first encapsulation layer to allow removal of at least a portion of the first and second sacrificial layer (30, 32); removing at least a portion of the first and second sacrificial layer (30, 32) to form the chamber, wherein a portion of the second sacrificial layer remains between the chamber and the contact via so that the contact via is disposed outside the chamber; sealing the chamber by depositing a second encapsulation layer on the first encapsulation layer, wherein the second encapsulation layer consists of a semiconductor material and covers the vent and the contact via; forming a trench (46a, 46b) in the first and the second encapsulation layer (28a, 28b) around the contact via; and depositing an insulating material in the trench (46a, 46b) to electrically isolate the electrical contact. providing a substrate with a first sacrificial layer, an electrical contact and mechanical structures (20, 20b, 20c, 20d), wherein the electrical contact and the mechanical structures (20a, 20b, 20c, 20d) are both disposed on the first sacrificial layer; depositing a second sacrificial layer over the mechanical structures (20a, 20b, 20c, 20d) and at least a portion of the electrical contact, directly covering the mechanical structures (20a, 20b, 20c, 20d) and the portion of the electrical contact; forming an opening into the second sacrificial layer, wherein the opening is positioned in a portion of the second sacrificial layer which covers the electrical contact; depositing a first encapsulation layer over the second sacrificial layer filling up the opening for forming a contact via, wherein the first encapsulation layer consists of a semiconductor material; forming at least one vent through the first encapsulation layer to allow removal of at least a portion of the first and second sacrificial layer (30, 32); removing at least a portion of the first and second sacrificial layer (30, 32) to form the chamber, wherein a portion of the second sacrificial layer remains between the chamber and the contact via so that the contact via is disposed outside the chamber; sealing the chamber by depositing a second encapsulation layer on the first encapsulation layer, wherein the second encapsulation layer consists of a semiconductor material and covers the vent and the contact via; forming a trench (46a, 46b) in the first and the second encapsulation layer (28a, 28b) around the contact via; and depositing an insulating material in the trench (46a, 46b) to electrically isolate the electrical contact.