Numerous pores that penetrate the double membrane of a cell’s nucleus are essential to the well-being of the whole cell. Each pore is actually in the centre of an elaborate basket of proteins. Perhaps the largest and most important molecular machine in the cell, this eight-fold complex around an individual pore consists of at least 450 individual protein molecules composed of 34 distinct nucleoporin proteins. This is a large and extremely complex structure with a very fancy function. The NPC is the gatekeeper into and out of the nucleus, and it is very particular what it lets through. Larger molecules must be actively transported across the nuclear envelope and they must first be recognized by the nuclear transport proteins: “only those macromolecules carrying specific import and export signals are permitted to pass through the central channel of the NPC.” [p. 333] One major task is to encourage the passage of mRNA out of the nucleus into the cytoplasm. The NPC seems to coordinate the smooth delivery of the mRNA molecules to the ribosomes for protein synthesis. [ See David Grunwald et al. 2011. Nuclear export dynamics of RNA-protein complexes. Nature. 475: pp 333-341.]
Amazingly, the entire nuclear membrane disappears during cell division. This means that the entire structure including those highly complex nuclear pore complexes must reconstitute themselves following cell division. It seems unlikely that foreign DNA could penetrate through the nuclear membrane while it is intact, but during cell division, foreign DNA can more easily become incorporated into the nucleus.
The nuclear pore complex is one of the amazing differences between prokaryotes (bacteria and archaea) and eukaryotes. Its complexity and importance to cell function certainly challenge any proposal regarding how this machine could develop spontaneously. Also, even if foreign genes managed to become incorporated into the genetic material inside the nucleus (as in endosymbiosis theories), their mRNA would not be able to get out of the nucleus to become translated into proteins because they need special signals to pass through the NPC.