Third-party funding ('TPF') contracts allow a third-party funder to invest in a lawsuit to which it is not a party by paying the plaintiff's or defendant's litigation costs. If the lawsuit is successful for the funded party, the funder will receive a portion of the amount awarded. If the funded loses the lawsuit, the funder will not recover the amount invested. For the funder, it is another financial product that can be included in its investment portfolio and generally offers a high return. For the funded party, the fact that a third party assumes the litigation costs, sometimes very high, means better access to justice, especially when it has limited or no resources to litigate. Although the TPF originated in Common Law systems, it has recently appeared in Civil Law jurisdictions such as Spain. The purpose of this paper is to address this phenomenon from a legal perspective, focusing particularly on the legal treatment that the Spanish and European Union legal systems can offer to the TPF, differentiating it from other related figures such as contingency fees or assignment of claims and addressing some of the cross-border problems that may arise. We also refer to the need to adequately manage conflicts of interest and to the notion of security for costs.