
470 So.2d 112 (1985)
A.J. ROBINSON, Jr.
v.
NORTH AMERICAN ROYALTIES, INC., David C. Bintliff and the Stone Oil Company.
No. 85-C-0692.
Supreme Court of Louisiana.
June 7, 1985.
*113 PER CURIAM.
The court of appeal affirmed the trial court's maintaining of defendant's exception of no cause of action on the basis that "the sublease which Stone Oil acquired from North American covered only the land located within the boundaries of the 13,850 foot RA SU A production unit".[1] 463 So.2d 1384, at 1388 (La.App.1985). Plaintiff's application for certiorari to this court asserts that:
"By taking a farmout of the Petitjean Lease from North American, Stone Oil acquired the right to explore and develop the entirety of the Petitjean Lease, which right North American previously owned. It was contemplated that Stone Oil would drill a test well and earn an interest in the acreage upon completion of a well capable of production in paying quantities. A test well was completed, Stone Oil earned its interest in the acreage and has recognized Robinson's override as to the acreage it was assigned. However, the sublease of a portion of the Petitjean Lease to Stone Oil did not end Stone's farmout rights and in fact was only one step in the transaction. Stone Oil had rights and opportunities afforded it by the farmout agreement to develop the remainder of the Petitjean acreage. Instead, it attempted to circumvent any obligations arising out of the contractoral relationship between Robinson, North American and Stone Oil by allowing the farmout and Petitjean Lease to expire and obtaining a new lease from the Petitjeans. If the ruling of the Third Circuit is allowed to stand, Stone Oil will have accomplished exactly what the anti-washout provision was designed to prevent." (Emphasis supplied, footnotes omitted)
Thus, the application, while conceding that the sublease covered only the area within the units, asserts that the farmout agreement prior to the sublease covered the entirety of the original lease to plaintiff.[2] However, neither of these documents is attached to the petition.
No evidence may be offered at any time to support or controvert the objection that the petition fails to state a cause of *114 action. La.C.C.P. Art. 931. In deciding an exception of no cause of action, the court accepts the facts alleged in the petition, without reference to any extraneous supporting or controverting evidence, and determines whether the law affords any relief to plaintiff if those facts are proved at trial.
Perhaps the documents referred to in plaintiff's certiorari application (or other evidence) would support plaintiff's argument that Stone Oil's obligation arose from the farmout agreement, and perhaps this expanded or clarified evidence might change the intermediate court's decision which was based on the fact that the sublease covered only the land within the unit.[3] In any event, plaintiff's application to this court at least establishes his entitlement to an opportunity to amend his petition to allege the facts asserted in his certiorari application. When the grounds of an objection pleaded by the peremptory exception may be removed by amendment of the petition, the judgment sustaining the exception shall order such amendment. La. C.C.P. Art. 934. Plaintiff is therefore entitled to an opportunity under the mandatory terms of the Code to attempt to remove the grounds for the objection by amending his petition, before his action can be dismissed with prejudice and without an opportunity to go to trial.
Accordingly, the application is granted, and the judgment of the court of appeal is amended to permit plaintiff to amend the petition within twenty days of this order. The case is remanded to the district court for that purpose and for further proceedings.
DENNIS, J., would grant the writ.
WATSON, J., would deny the writ.
NOTES
[1]  On this factual premise, the court of appeal decided that since Stone Oil never acquired an "interest" in the land outside the unit, La.R.S. 31:128 was only applicable to make Stone Oil responsible to plaintiff as to the land within the unit, and "it cannot be said that Stone Oil acquired any obligations of the original lessor [plaintiff] or his successors in [the land outside the unit]".
[2]  According to Article VII of plaintiff's petition, a farmout agreement was confected by letters dated August 20, 1978, May 21, 1979 and October 23, 1979, the unit was formed by order of August 21, 1979, and the 60% sublease by North American to Stone Oil, covering the land within the unit, was dated August 25, 1980.
[3]  This case illustrates that the motion for summary judgment is the much more useful device for raising legal issues such as the one presented in this case. Under that procedure, both parties can present evidence of facts and documents not included in the petition.
