
677 So.2d 387 (1996)
Peter TWIDDY, Appellant,
v.
Salvador ROCA and Sonia Roca, Appellees.
No. 95-03044.
District Court of Appeal of Florida, Second District.
July 24, 1996.
*388 John F. Stanley of Vega, Stanley, Martin & Zelman, Naples, for Appellant.
Jeffrey D. Troy of Troy & Yeslow, P.A., Fort Myers, for Appellees.
CAMPBELL, Judge.
Appellant, Peter Twiddy, challenges the trial court order awarding attorney's fees and costs to the appellees, Salvador and Sonia Roca, pursuant to section 768.79, Florida Statutes (1987). We agree that the trial court erred and reverse.
In this personal injury action, Twiddy sued the Rocas for injuries he allegedly sustained in an automobile accident that occurred on August 8, 1989. The Rocas made an offer of judgment of $5,000.00, to which Twiddy did not respond. After a trial, the jury found no negligence and, therefore, no liability on the part of the Rocas. Pursuant to their offer of judgment, the trial court awarded them $17,000.00 in attorney's fees and costs relying on section 768.79.
An award of attorney's fees pursuant to section 768.79 is controlled by the statute in effect when the cause of action accrued, not when the offer was made. See Metropolitan Dade County v. Jones Boatyard, Inc., 611 So.2d 512 (Fla.1993); City of Punta Gorda v. Burnt Store Hotel, Inc., 650 So.2d 142 (Fla. 2d DCA 1995); Brodose v. School Bd. of Pinellas County, 622 So.2d 513 (Fla. 2d DCA 1993). While we recognize that following the 1990 amendment to section 768.79, attorney's fees may now be awarded to a defendant who makes an offer of judgment where there has been a finding of no liability on the part of the offeror, the 1987 version of the statute which did not so provide is applicable to the instant action since the cause of action accrued in 1989.
The 1987 version of section 768.79 provides that there must be a judgment rendered in favor of the plaintiff before costs and attorney's fees can be awarded to a defendant who has made an offer of judgment pursuant to the statute. See Luizza v. Yaeger, 571 So.2d 600 (Fla. 2d DCA 1990); Kline v. Publix Supermarkets, Inc., 568 So.2d 929 (Fla. 2d DCA 1990). Since there was no judgment for Twiddy against the Rocas in this case, the Rocas are not entitled to attorney's fees or costs under section 768.79(1)(a), Florida Statutes (1987).
We, therefore, reverse the order awarding attorney's fees and remand for treatment consistent herewith.
DANAHY, A.C.J., and PATTERSON, J., concur.
