On this page 16 sections
- Introduction to Legality in Contract Law
- Statutory Basis: The Law of Contract Act, Cap. 345
- Categories of Unlawful Agreements
- Agreements Forbidden by Law
- Agreements That Defeat the Provisions of Law
- Fraudulent Agreements
- Agreements Involving Injury to Person or Property
- Immoral Agreements
- Agreements Opposed to Public Policy
- Agreements in Restraint of Marriage (Section 26)
- Agreements in Restraint of Trade (Section 27)
- Agreements in Restraint of Legal Proceedings (Section 28)
- Uncertain Agreements (Section 29)
- Wagering Agreements (Section 30)
- Consequences of Illegality
- Key Exam Takeaways
Introduction to Legality in Contract Law
In contract law, parties generally have the freedom to agree on any terms they like. This principle is known as freedom of contract.
However, the law places an important limitation on this freedom. Courts will not enforce agreements whose object or consideration is unlawful.
In simple terms, even if two parties willingly agree to something, the law will refuse to assist them if the agreement:
-
Breaks the law
-
Promotes fraud or wrongdoing
-
Harms others
-
Undermines public policy
The courts refuse to enforce such agreements because the legal system should not be used to support illegal or harmful activities.
This principle is clearly provided under Tanzanian law.
Statutory Basis: The Law of Contract Act, Cap. 345
Section 23 — When Consideration or Object is Unlawful
The main rule is found in Section 23 of the Law of Contract Act, Cap. 345 R.E. 2023, which states that:
“The consideration or object of an agreement is lawful, unless—
it is forbidden by law; or
is of such a nature that, if permitted, it would defeat the provisions of any law; or
is fraudulent; or
involves or implies injury to the person or property of another; or
the court regards it as immoral, or opposed to public policy.”
This section identifies six situations where consideration or object becomes unlawful.
Section 24 — Effect of Unlawful Object or Consideration
Section 24 of the Law of Contract Act provides the legal consequence:
“Every agreement of which the object or consideration is unlawful is void.”
This means:
-
The agreement has no legal effect
-
The court will not enforce it
-
The parties cannot sue each other based on that agreement
Categories of Unlawful Agreements
Section 23 identifies several categories of illegality. Let us examine each one carefully.
Agreements Forbidden by Law
Meaning
An agreement is unlawful if its object or consideration is directly prohibited by statute or written law.
If a law explicitly bans a certain act, a contract that requires that act cannot be enforced by courts.
Example
Suppose two people agree to sell narcotic drugs prohibited under the Drug Control and Enforcement Act, Cap. 95 R.E. 2022.
Even if both parties agree voluntarily:
-
The contract is illegal
-
The court will refuse to enforce it
Case Authority
A classic authority illustrating this principle is:
Everet v Williams (1725) 9 L.Q.R. 197
Facts:
Two highway robbers entered into an agreement to share profits from their robberies. One later sued the other to claim his share.
Decision:
The court dismissed the claim.
Principle established:
Courts will not assist parties who rely on an illegal contract.
Agreements That Defeat the Provisions of Law
Meaning
Some agreements may not be directly prohibited by statute but their effect undermines the purpose of a law.
Such agreements are also unlawful.
Example
Two competing companies secretly agree to fix prices to avoid competition.
This arrangement defeats the purpose of competition law, particularly the Fair Competition Act, Cap. 285 R.E. 2022, which promotes fair market competition.
Therefore, the agreement would be void under Section 23.
Case Authority
Miller v Karlinski (1945) 62 TLR 85
Principle:
A contract designed to circumvent statutory regulation will be treated as illegal.
Fraudulent Agreements
Meaning
An agreement is unlawful if its purpose is to commit fraud or deceive another party.
Fraud involves intentional deception for financial gain.
Example
A and B agree that:
-
A will submit falsified financial documents to a bank
-
The bank will issue a loan based on the false information
-
A and B will share the money
This agreement is clearly fraudulent.
Therefore:
-
The contract is void
-
The court will not enforce it
Case Authority
Alexander v Rayson [1936] 1 KB 169
Facts:
A landlord created two agreements with a tenant to disguise the real rent and evade tax.
Decision:
The court declared the agreement illegal and unenforceable.
Principle:
Contracts designed to deceive authorities or commit fraud are void.
Agreements Involving Injury to Person or Property
Meaning
If the object of an agreement is to cause harm to another person or their property, the agreement is unlawful.
The law protects individuals and property from intentional harm.
Example
A agrees to pay B to:
-
Burn a competitor’s warehouse
-
Damage another person’s vehicle
-
Assault someone
Such agreements are illegal and void.
Case Authority
Clay v Yates (1856) 1 H & N 73
Principle:
A contract that encourages wrongful acts causing injury to others is unenforceable.
Immoral Agreements
Meaning
Courts may refuse to enforce agreements considered immoral according to societal standards.
The concept of immorality usually arises in contracts involving:
-
Sexual immorality
-
Prostitution
-
Agreements promoting sexual misconduct
Example
An agreement where:
-
A agrees to pay money
-
In exchange for sexual services
Courts traditionally treat such agreements as void for immorality.
Case Authority
Pearce v Brooks (1866) LR 1 Ex 213
Facts:
A coach builder hired out a carriage to a prostitute knowing it would be used to attract clients.
Decision:
The court refused to enforce payment for the carriage hire.
Principle:
Courts will not enforce contracts connected with immoral activities.
Agreements Opposed to Public Policy
Meaning
Public policy refers to principles that protect the public interest and the proper functioning of society.
Courts may declare agreements void if they:
-
Harm public welfare
-
Interfere with justice
-
Undermine social institutions
Because the concept of public policy is broad, courts apply it very cautiously.
The Law of Contract Act identifies several specific agreements considered contrary to public policy.
These are found in Sections 26 to 30 of the Act.
Agreements in Restraint of Marriage (Section 26)
Legal Rule
Section 26 of the Law of Contract Act provides that:
Every agreement in restraint of the marriage of any person, other than a minor, is void.
This rule protects freedom to marry.
Example
A wealthy person promises to give someone money if they never marry.
Such an agreement is void.
Case Authority
Lowe v Peers (1768) 4 Burr 2225
Facts:
A man promised to pay money if he married anyone other than the plaintiff.
Decision:
The agreement was held void for restraining marriage.
Agreements in Restraint of Trade (Section 27)
Legal Rule
Section 27 of the Law of Contract Act states:
Every agreement by which anyone is restrained from exercising a lawful profession, trade, or business is void to that extent.
The law protects the freedom to work and conduct business.
Exceptions to Restraint of Trade
Tanzanian law (following Indian contract law) recognises certain reasonable restraints, particularly in:
1. Sale of a Business
When someone sells a business, they may agree:
-
Not to open a competing business
-
Within a specific geographic area
-
For a reasonable period
Example:
A person sells a bakery in Dar es Salaam and agrees not to open another bakery within the city for two years.
Such a restraint may be enforceable if it is reasonable.
2. Protection of Trade Secrets in Employment
Employees may agree not to disclose:
-
Trade secrets
-
Confidential business information
After leaving employment.
However, restraints must be reasonable in scope and duration.
Case Authority
Nordenfelt v Maxim Nordenfelt Guns and Ammunition Co Ltd [1894] AC 535 (HL)
Facts:
The seller of a weapons business agreed not to compete worldwide for 25 years.
Decision:
The House of Lords held that restraint of trade clauses are valid if they are reasonable between the parties and in the public interest.
Principle:
A restraint of trade may be enforceable if it is reasonable in time, scope, and geographic area.
Exam Illustration
Void restraint
An employment contract stating:
-
“The employee shall never work in the same industry anywhere in Tanzania for life.”
This is clearly unreasonable and void.
Agreements in Restraint of Legal Proceedings (Section 28)
Legal Rule
Section 28 of the Law of Contract Act states that agreements which absolutely restrict parties from enforcing their legal rights in court are void.
The law protects the right of access to justice.
Valid Exception: Arbitration
However, agreements requiring disputes to be resolved through arbitration are valid.
Arbitration does not eliminate legal rights; it simply changes the forum where disputes are resolved.
Case Authority
Scott v Avery (1856) 5 HL Cas 811
Principle:
An arbitration clause requiring disputes to be resolved by arbitration before going to court is valid and enforceable.
Uncertain Agreements (Section 29)
Legal Rule
Section 29 of the Law of Contract Act provides that:
Agreements whose meaning is not certain, or capable of being made certain, are void.
Contracts must be clear and definite.
Example
A says to B:
“I agree to sell you some rice at a reasonable price.”
Problems:
-
How much rice?
-
What price?
Because the agreement is too vague, it is void for uncertainty.
Case Authority
Scammell v Ouston [1941] AC 251 (HL)
Principle:
If contractual terms are too vague or uncertain, the agreement cannot be enforced.
Wagering Agreements (Section 30)
Meaning
A wager is a bet where two parties agree that:
-
One will pay the other depending on the outcome of an uncertain event.
Legal Rule
Section 30 of the Law of Contract Act states that wagering agreements are void.
Example
Ali and John bet TZS 100,000 on the result of a football match.
If Ali wins and John refuses to pay:
-
Ali cannot sue in court
-
The agreement is void
Case Authority
Carlill v Carbolic Smoke Ball Co [1893] 1 QB 256
Although the case primarily concerns unilateral contracts, it also clarifies that genuine commercial offers are different from wagers.
Consequences of Illegality
When a contract is declared illegal or void, several legal consequences arise.
General Rule: Restitution (Section 65)
Section 65 of the Law of Contract Act provides:
When an agreement is discovered to be void, any person who has received an advantage under the agreement must restore it.
This principle prevents unjust enrichment.
Example:
If A pays B money under a contract later discovered to be void, B may have to return the money.
Limitation: The Doctrine of In Pari Delicto
The Latin phrase in pari delicto means:
“Where both parties are equally at fault.”
In such cases:
-
Courts usually refuse to help either party
-
Each party must bear their own loss
Case Authority
Holman v Johnson (1775) 1 Cowp 341
Principle established by Lord Mansfield:
“No court will lend its aid to a man who founds his cause of action upon an immoral or illegal act.”
Exception: Protection of the Innocent Party
If the parties are not equally guilty, the court may assist the innocent party.
For example:
-
One party was deceived
-
One party acted under pressure
-
One party was unaware of the illegality
In such cases, restitution may still be allowed.
Key Exam Takeaways
When answering exam questions on legality of object and consideration, remember these core points:
1. Governing statute
Law of Contract Act, Cap. 345 R.E. 2023
Sections 23–30
2. An agreement is unlawful if it is:
-
Forbidden by law
-
Defeats provisions of law
-
Fraudulent
-
Causes injury to person or property
-
Immoral
-
Opposed to public policy
3. Specific void agreements
Sections 26–30 identify specific categories:
-
Restraint of marriage
-
Restraint of trade
-
Restraint of legal proceedings
-
Uncertain agreements
-
Wagering agreements
4. Legal consequence
Under Section 24, such agreements are void.
5. Recovery of benefits
Under Section 65, benefits may be restored unless both parties are equally at fault (in pari delicto).
Test yourself
Legality of Object and Consideration Quiz Quiz
10 questions · instant feedback
