
2 So.3d 366 (2008)
LITON LIGHTING, a foreign corporation, Appellant,
v.
PLATINUM TELEVISION GROUP, INC., a Florida corporation, Appellee.
No. 4D07-4748.
District Court of Appeal of Florida, Fourth District.
December 24, 2008.
*367 John R. Kelso of Levey, Filler, Rodriguez, Kelso & De Bianchi, LLP, Miami, for appellant.
Andrew S. Goldwyn of Andrew S. Goldwyn, P.A., Boca Raton, for appellee.
HAZOURI, J.
Liton Lighting, Inc., a California corporation, sued Platinum Television Group, Inc., a Florida corporation, for breach of contract and, in the alternative, unjust enrichment. After approximately five years of litigation, the case was set for non-jury trial commencing in June 2007. During the course of trial, the judge sua sponte dismissed the case because the contract on which Liton sued provided for non-binding arbitration, which the parties failed to utilize. Additionally, if their dispute could not be resolved, the contract had a forum selection clause, placing venue in federal court. Liton asserts that the trial judge was without authority to sua sponte dismiss this action. We agree.
In its complaint, Liton sought damages in excess of $15,000.00, claiming actual and consequential damages resulting from Platinum's breach of contract. In its answer, Platinum raised as its only affirmative defense that the products delivered to it by Liton were defective. Platinum never asserted as an affirmative defense the failure to arbitrate or improper venue.
A trial judge may not sua sponte dismiss an action based on affirmative defenses not raised by proper pleadings. See Kerrigan, Estess, Rankin, & McLeod v. State, 711 So.2d 1246, 1249 (Fla. 4th DCA 1998). When a trial judge sua sponte dismisses a cause of action on grounds "not pleaded," the trial judge denies the parties due process because the claim is being dismissed without "notice and an opportunity for the parties and counsel to be heard." Id.
In the instant case, the trial judge denied Liton due process because he dismissed *368 its claim for failure to arbitrate and improper venue, which were two affirmative defenses not raised in Platinum's Answer. Accordingly, we reverse and remand for further proceedings consistent with this opinion.
Reversed and Remanded.
TAYLOR, J., and BLANC, PETER D., Associate Judge, concur.
