The invention provides for transgenic donor animals (e.g., pigs) whose cells, tissues and organs have a better long-term survival when transplanted into a human patient. The transgenic donor animal carries one or more human transgenes which is expressed only when the endogenous gene of the donor animal is knocked out shortly before a graft is harvested for transplantation. This “genetic switch” allows the donor animal to remain healthy during the majority of its lifetime, while still allowing expression of the human transgene for optimal transplant tolerance in a human recipient. The transgene may encode a cytokine receptor, an adhesion molecule, or a complement regulatory protein.