This study focuses on the conflict between the principle of pacta sunt servanda (agreement on the choice of court in a contract)and the principle of actor sequitur forum rei (lawsuit filed at the place of residence of the defendant) in determining the relative competence of the court. The purpose of this study is to analyze the construction of the meaning of the agreement, the application of these two principles, and their impact on justice for the disputing parties. The research method employs a normative juridical approach, utilizing a statutory approach, a conceptual approach, and a case approach, which examines legislation, legal concepts, and related court decisions. The results of the study show that the application of the pacta sunt servanda principle or the choice of domicile in accordance with the contents of the contract often conflicts when the lawsuit filed by the plaintiff does not correspond to the domicile chosen in the agreement. In several decisions reviewed, the court determined relative jurisdiction in accordance with thethe chosen domicile without considering the bargaining position of both parties, thuscausing injustice to the weaker party, because judges tend toprioritize the forum selection clause without considering the bargaining position of theparties, even though based on Article 118 paragraph (4) of the HIR, the choice of domicile inan agreement is not absolute, but voluntary. This study recommends the need for a balance between legal certainty and substantive justice, which must be maintained by judges, as well as the strategic role of notaries in providing legal education to parties regarding the consequences of court jurisdiction clauses.