Device (1) for occlusion of an opening in the heart, comprising: a first element (2), comprising at least one thread or wire (3), and a second element (6), which is connected to the first element (2) and further comprising at least one longitudinal section, said second element (6) comprising a braided material, said braided material comprising at least one thread or wire (9), and in which the diameter of said second element (6 ) is substantially the same size or smaller than said opening for all, at least one, longitudinal sections, when said device (1) is in a pre-established expanded configuration, in which the first element (2) has a first section ( 4) and a third section (8) with a distance signified as L between the first section (4) and the third section (8) of the first element (2), when the device is in its pre-established expanded configuration, and with a diameter meaning as D of the first section (4) or the third section (8) of the first element (2), said second element (6) has an oval-like shape in its cross section with a shorter diameter meant as B, and a diameter longest meaning as A, characterized in that the relationship between said longest diameter meant as A and said shortest diameter meant as B is in the range of 1.8-5.15, the relationship between said diameter meant as D and said distance signified as L is in the range of 1.4-5.6, preferably in the range of 3.2-5.6; the relationship between said diameter signified as D and said longest diameter signified as A is in the range of 1.3-2.2; and the relationship between said diameter meant as D and said shorter diameter meant as B is in the range of 2.3-6.3.Dispositivo (1) de oclusión de una abertura en el corazón, que comprende: un primer elemento (2), que comprende al menos un hilo o alambre (3), y un segundo elemento (6), que está unido con el primer elemento (2) y que además comprende al menos una sección longitudinal, comprendiendo dicho segundo elemento (6) un material trenzado, comprendiendo