Embryologic development of the interatrial septum is in stages. Initially an anteroposterior partition, the septum primum, grows down from the superior border of the common atrium to divide the right from the left atrium. Before it reaches the endocardial cushion, its superior connection with the atrial roof is severed and it is free. Failure of the septum primum to form or to incompletely form, will cause an atrial septal primum defect.
The septum secundum grows downward from the atrial roof until its edge overlaps the superior border of the septum primum. These overlapping membranes form a flap between the two atria with the secundum to the right of the primum. Before birth the RAP is increased which opens this flap and the blood flows through this flap to the left atrium. After birth, with the establishment of normal pulmonary blood flow, the gradient between the left and right atrium is reversed and the increase left atrial pressure keeps the flap closed. Failure of the septum secundum to form or to incompletely form, will cause a atrial septal secundum defect.
In 75% of individuals, the opposing surfaces of the flaps fuse, causing the septum secundum to form the superior crescent shape of the foramen ovale.
In the other 25%, the surfaces fail to fuse. As a result, the septum remains anatomically open but functionally closed. This is called a patent foramen ovale (PFO). If right atrial pressure is greater than left atrial pressure (e.g. pulmonary hypertension, severe tricuspid regurgitation, right ventricular failure, etc), the PFO can open and create a right-to-left shunt.