1 EXHIBIT 5 [GABLE GOTWALS MOCK SCHWABE KIHLE GABERINO LETTERHEAD] April 24, 1997 ONEOK Inc. 100 West Fifth Street Tulsa, OK 74103 Re: Form S-3, Registration Statement Under the Securities Act of 1933, relating to 334,252 shares of Common Stock, Without Par Value of ONEOK Inc. Gentlemen: We are retained as regular counsel for ONEOK Inc., a Delaware corporation (hereinafter called the "Company") which will file with the Securities and Exchange Commission under the Securities Act of 1933, as amended, a Registration Statement on Form S-3 (including a Prospectus) relating to the registration of three hundred thirty-four thousand, two hundred fifty- two (334,252) presently outstanding shares of the common stock of the Company (the "Common Stock") held by certain stockholders of the Company ("Selling Stockholders"), as more fully described in the Prospectus. We have examined (a) the above-mentioned Registration Statement which is being filed with the Securities and Exchange Commission; (b) the Third Restated Certificate of Incorporation and the By-laws, as amended, of the Company; (c) the corporate actions taken by the Board of Directors of the Company in connec- tion with the issuance of the Common Stock; and (d) other documents as we have considered relevant to the matters covered by this opinion. In connection with the foregoing, we wish to advise you as follows: 2 ONEOK Inc. (Date) Page 2 1. The Company is a corporation validly organized and existing under the laws of the State of Delaware and is duly qualified to do business as a foreign corporation in the State of Oklahoma. 2. The filing of the above-mentioned Registration Statement has been duly authorized by the proper corporate action on the part of the Company. 3. The Common Stock when sold by the Selling Shareholders will be legally issued, fully paid and non-assessable in the hands of the owners thereof. We hereby consent to: 1. Being named in the above-mentioned Form S-3 Registration Statement and the Prospectus which is being made a part thereof, and in any amendments thereto, under the caption "Experts," and "Legality," as counsel for the Company, passing upon legal matters in connection with the Common Stock and having reviewed the matters of law and legal conclusions under "Description of Common Stock" contained in said Prospectus which are included therein under our authority as experts. 2. The filing of this opinion as an exhibit to the above-mentioned Form S-3 Registration Statement. Very truly yours, GABLE GOTWALS MOCK SCHWABE KIHLE GABERINO By /s/ DONALD A. KIHLE ----------------------------------- Donald A. Kihle DAK:bb