National City Bank filed a foreclosure suit against Kristin A. Nagel, et. al.; the complaint alleged that the note and mortgage had been executed in favor of First Franklin Financial, but that plaintiff was now the “owner” of the note. No answer, pleading, or paper of any kind was filed by the defendants. Thereafter, National City Bank filed a “Motion to Substitute Party Plaintiff,” alleging the note had been assigned subsequent to the filing of the foreclosure suit. The trial court sua sponte reviewed the public records and concluded that National City Bank did not own the note at the time the suit was filed and therefore lacked standing. The trial court thereafter dismissed the action. We reverse. “A trial judge may not sua sponte dismiss an action based on affirmative defenses not raised by proper pleadings” as a dismissal under these circumstances “denies the parties due process because the *459claim is being dismissed without ‘notice and an opportunity for the parties and counsel to be heard.’ ” Liton Lighting v. Platinum Television Grp., Inc., 2 So.3d 366, 367 (Fla. 4th DCA 2008) (quoting Kerrigan, Estess, Rankin & McLeod v. State, 711 So.2d 1246, 1249 (Fla. 4th DCA 1998)).
Reversed and remanded for further proceedings.
CIKLIN, J., and WALSH, LISA S., Associate Judge, concur.