A complex of proteins related to those involved in bacterial DNA conjugative transfer, that permits the transfer of DNA or proteins into the extracellular milieu or directly into host cells. In general the type IV complex forms a multisubunit cell-envelope-spanning structure composed of a secretion channel and often a pilus or other surface filament or protein(s).