Method for producing a micromechanical component (1) with a substrate (3) and with a cap (7) connected to the substrate (3) and enclosing a first cavity (5) with the substrate (3), wherein a first pressure prevails in the first cavity (5) and a first gas mixture with a first
chemical composition is enclosed, wherein -- in a first method step (101), an access opening (11) connecting the first cavity (5) to an environment (9) of the micromechanical component (1) is formed in the substrate (3) or in the cap (7), wherein -- in a second method step (102), the first pressure and / or the first
chemical composition in the first cavern (5) is adjusted, wherein -- in a third method step (103), the access opening (11) is closed by introducing energy or heat into an absorbing part of the substrate (3) or the cap (7) using a
laser, wherein the introduction of the energy or heat is controlled by means of a
laser beam (1005) comprising a spatial
laser pulse extension (1001) extending essentially along a surface (1011) of the substrate (3) or the cap (7) facing away from the first cavity (5) and extending essentially parallel to a main extension plane (100) of the substrate (3) and a laser
pulse intensity (1003) for reducing residual stresses in the substrate (3) or in the cap (7), wherein the introduction of the energy or heat is controlled by means of the laser beam (1005) such that the laser pulse extension (1001) comprises a first laser pulse extension region (1007) with at least a first laser
pulse intensity and a second laser pulse extension region (1009) with at least a second laser
pulse intensity,wherein a projection of the first laser pulse extension region (1007) onto the main extension plane (100) and a projection of the access opening (11) onto the main extension plane (100) at least partially overlap, characterized in that the introduction of the energy or heat is controlled by means of the laser beam (1005) such that the second laser pulse extension region (1009) comprises a first sub-region (1013) and a second sub-region (1015), wherein a projection of the first sub-region (1013) onto the main extension plane (100) and a projection of the second sub-region (1015) onto the main extension plane (100) are spaced apart from one another.