
366 S.E.2d 556 (1988)
89 N.C. App. 555
Harold MORRIS, Grace Morris Helms, and Nina H. Browder, Representative of the Estate of Catherine Morris Helms, Plaintiffs,
v.
PLYLER PAPER STOCK COMPANY, INC., Defendant.
No. 8726SC911.
Court of Appeals of North Carolina.
April 5, 1988.
*557 Kennedy, Covington, Lobdell & Hickman by Wayne Huckel and Alton D. Bain, Charlotte, for plaintiffs.
No brief filed for defendant.
COZORT, Judge.
Plaintiffs filed this declaratory judgment action seeking a declaration of their rights under a lease with defendant. From the trial court's order granting defendant's motion to dismiss, plaintiffs appeal. We reverse.
Harvey Morris died on 15 August 1982. In his will he devised a thirteen-acre tract of land in fee simple to his wife and three children. His will directed that:
[N]one of said developed real estate be sold for a period of five years from the date of my death.... I direct that during said five-year period my son, Harold Morris, shall manage said property, make necessary repairs, rent the same, collect the rents, pay all insurance premiums, taxes and other expenses out of the rents, and then divide the net amount in four equal shares and pay the same to the persons hereinabove named at least once every year.... At the expiration of the five-year period, I suggest the property not be sold at that time unless it can be sold at a great advantage.
On 27 August 1982, Harold Morris, as agent for the estate of Harvey Morris, leased a portion of the subject property to defendant. The lease provided that it would last for five years, beginning 1 September 1982, and that at the end of that time, defendant would have the option to renew the lease for an additional five years. The lease also provided that defendant had the option to purchase the leased property during the original or renewal lease terms.
On 12 January 1987, defendant gave written notice of its intention to exercise both its option to renew and its option to purchase. On 9 March 1987, plaintiffs, the children of Harvey Morris, filed a complaint for declaratory judgment alleging that the lease options are void and that they hinder plaintiffs' efforts to sell the property on the open market. Defendant filed a motion to dismiss pursuant to Rule 12(b)(6) on the grounds that plaintiffs failed to state a claim upon which relief could be granted. From the trial court's order which granted this motion, plaintiffs appeal.
Plaintiffs contend that the trial court erred in granting defendant's Rule 12(b)(6) motion, because the allegations of its complaint were sufficient to state a claim for declaratory judgment. We agree.
*558 The test on a motion to dismiss under Rule 12(b)(6) is whether the pleading is legally sufficient to state a cause of action. Drilling Co. v. Nello L. Teer Co., 38 N.C. App. 472, 478, 248 S.E.2d 444, 448 (1978). In ruling on the motion, the allegations of the complaint are treated as true, Johnson v. Bollinger, 86 N.C.App. 1, 4, 356 S.E.2d 378, 381 (1987), and on that basis the trial court must determine as a matter of law whether the allegations state a claim for which relief may be granted. Stanback v. Stanback, 297 N.C. 181, 254 S.E.2d 611 (1979). The "`issue is not whether a plaintiff will ultimately prevail, but whether the claimant is entitled to offer evidence to support the claims.'" Johnson v. Bollinger, 86 N.C.App. at 4, 356 S.E.2d at 381.
A motion to dismiss for failure to state a claim is seldom appropriate "in actions for declaratory judgments, and will not be allowed simply because the plaintiff may not be able to prevail." Consumers Power v. Power Co., 285 N.C. 434, 439, 206 S.E.2d 178, 182 (1974). The motion is allowed only when "there is no basis for declaratory relief, as when the complaint does not allege an actual, genuine existing controversy." Id. A claim for declaratory relief is sufficient if the complaint alleges the existence of a real controversy arising out of the parties' opposing contentions and respective legal rights under a deed, will or contract in writing. Id. at 449, 206 S.E.2d at 188.
In the case sub judice, plaintiffs have clearly alleged that a genuine controversy exists with respect to the lease agreement. In their complaint, they stated that Harold Morris had no authority under his father's will to grant the options to renew and to purchase, and therefore these options are void. They further stated that defendant had acted to exercise its options and had threatened legal action if plaintiffs refuse to grant them. Finally, plaintiffs alleged that they were attempting to sell the property on the open market and that the existence of the options hindered their attempts to do so.
We hold that plaintiffs' complaint alleged sufficient facts to establish the existence of a genuine controversy and to survive defendant's motion to dismiss under Rule 12(b)(6). Therefore, we reverse the order of the trial court granting defendant's motion.
Reversed and remanded.
ARNOLD and PHILLIPS, JJ., concur.
