Viruses are remarkable nanomachines due to their organized structure and high efficiency to deliver nucleic acids into the cells. If we would be able to design a safe artificial virus with programmable capabilities, then we would to find cures for many diseases through delivery of a wide range of therapeutic nucleic acids. Posed by this challenge we designed an artificial virus from scratch by linking simple protein building blocks that mimic some of the complex functionalities found in the protective viral coat that encapsulates nucleic aids. Our engineered proteins were able to bind to DNA, to give protection, and to self-assemble into ordered elongated cylindrical nanostructures. Also, they were able to deliver DNA into cells. Besides nanomedicine, these proteins could be harnessed to produce diverse nanomaterials for technological applications such as electronics or catalysis. All this has large implications for the development of bio-nanotechnology.