The present invention provides for the intratumoral delivery of immunomodulators. In particular, it provides delivery of co-stimulatory molecules using intratumoral electroporation. The present invention provides a method for the treatment of malignancies, wherein the administration of a plasmid encoding for a therapeutic costimulatory protein, in combination with electroporation has a therapeutic effect on primary tumors as well as distant tumors and metastases.