
766 So.2d 436 (2000)
PALM AFC HOLDINGS, INC., Appellant,
v.
MINTO COMMUNITIES, INC., Palm Beach County, a political subdivision of the State of Florida, and George Webb, in his capacity as Palm Beach County Engineer and not Individually, Appellees.
No. 4D00-2623.
District Court of Appeal of Florida, Fourth District.
August 29, 2000.
*437 Brian B. Joslyn of Boose, Casey, Ciklin, Lubitz, Martens, McBane & O'Connell, West Palm Beach, for appellant.
Michael D. Joblove and Jonathan E. Perlman of Genovese, Lichtman, Joblove & Battista, Miami, and John H. Schulte of Schulte & Bisbing for Appellee-Minto Communities, Inc.
Robert P. Banks, Assistant County Attorney, West Palm Beach, for Appellee-Palm Beach County.

Order Dismissing Appeal
KLEIN, J.
Appellee Minto has moved to dismiss this appeal on the ground that the notice of appeal was not timely as to an order dismissing a complaint for failure to state a cause of action. Appellant responds that the order was not a final order because it did not contain the words "with prejudice," and therefore the notice of appeal, which is timely as to a subsequent order dismissing with prejudice, is timely. We grant the motion to dismiss.
On May 11, 2000, the trial court dismissed all counts in appellant's second amended complaint against Palm Beach County, stating: "Counts 1 through 4 of the second amended complaint are dismissed." The order did not grant leave to amend or contain the words "with prejudice." Appellant timely filed a motion for rehearing directed to that order, and that motion was denied on May 30, 2000.
Appellant next filed a motion for leave to amend on June 1, 2000, which was granted by agreement of the parties on June 12, 2000. Appellant did not file an amended complaint, but then moved "for entry of final appealable judgment" on June 22, 2000. The court then entered an order dismissing the counts against Palm Beach County with prejudice on June 29, 2000. Appellant filed its notice of appeal of the June 29, 2000 order on July 26, 2000.
Appellee Minto[1] has moved to dismiss the appeal on the ground that it is untimely, asserting that the May 11, 2000 order dismissing all counts as to Palm Beach County was a final appealable order, and that thirty days for filing the appeal ran from the rendition of that order, which occurred when the motion for rehearing directed to that order was denied. Appellant responds that the May 11, 2000 order was not a final order because it did not contain the words "with prejudice."
Appellee relies on Gries Investment Co. v. Chelton, 388 So.2d 1281 (Fla. 3d DCA 1980), in which the third district, after analyzing this precise issue, came to the conclusion that an order dismissing a complaint for failure to state a cause of action need not contain the words "with prejudice" in order to be final. The court reasoned that such a dismissal is final and the words "with prejudice" are redundant. Id. at 1282. Gries was followed, under facts similar to those in the present case, in Carnival Corp. v. Sargeant, 690 So.2d 660 (Fla. 3d DCA 1997). This court, in Smith v. St. Vil, 714 So.2d 603 (Fla. 4th DCA 1998), cited Carnival.
The rationale of the above cases, that the words "with prejudice" are not material in determining the finality of an order dismissing a complaint for failure to state a cause of action, is consistent with the rule that a dismissal for failure to state a cause of action is an adjudication on the merits. Hardee v. Gordon Thompson Chevrolet, Inc., 154 So.2d 174 (Fla. 1st DCA 1963). See also, North Shore Realty Corp. v. Gallaher, 99 So.2d 255 (Fla. 3d DCA 1957)(It is the substance of the order, not whether it contains the words *438 "with prejudice," which determines whether it is an adjudication on the merits).[2]
We agree with Gries and Carnival. Accordingly, just as in Carnival and Gries, the trial court had no jurisdiction when it entered the order granting leave to amend the complaint. The order dismissing with prejudice on June 29, 2000, was a nullity. This appeal, which is taken from that order, is untimely as to the May 11, 2000 order, and is therefore dismissed for lack of jurisdiction.
STONE and STEVENSON, JJ., concur.
NOTES
[1]  Minto has an interest in having the appeal against Palm Beach County dismissed.
[2]  See also Florida Rule of Civil Procedure 1.420(b), entitled "Involuntary dismissal" which provides in part:

Unless the court in its order for dismissal otherwise specifies, a dismissal under this subdivision and any dismissal not provided for in this rule, other than a dismissal for lack of jurisdiction or for improper venue or for lack of an indispensable party, operates as an adjudication on the merits.
