Exhibit 5.1

 

LOGO

January 12, 2024

Kodiak Gas Services, Inc.

15320 Highway 105 W, Suite 210

Montgomery, Texas

Ladies and Gentlemen:

We have acted as counsel to Kodiak Gas Services, Inc., a Delaware corporation (the “Company”), in connection with the preparation and filing of the Registration Statement on Form S-4 (the “Registration Statement”) with the Securities and Exchange Commission (the “Commission”) under the Securities Act of 1933, as amended (the “Securities Act”). The Registration Statement relates to the registration under the Securities Act of the offer and sale by the Company of up to 12,426,242 shares of the Company’s common stock, par value $0.01 per share, (the “Securities”) to be issued pursuant to the Agreement and Plan of Merger, dated as of December 19, 2023, by and among the Company, Kodiak Gas Services, LLC, Kick Stock Merger Sub, LLC, Kick GP Merger Sub, LLC, Kick LP Merger Sub, LLC, CSI Compressco LP and CSI Compressco GP LLC (the “Merger Agreement”).

We have examined and relied upon the accuracy of original, certified, conformed or photographic copies of such records, agreements, certificates and other documents as we have deemed necessary or appropriate to enable us to render the opinions set forth below. In all such examinations, we have assumed the genuineness of signatures on original documents and the conformity to such original documents of all documents submitted to us as certified, conformed or photographic copies and, as to certificates of public officials, we have assumed the same to have been properly given and to be accurate. As to matters of fact material to this opinion, we have relied, without independent verification, upon certificates, statements and representations of public officials and representatives of the Company.

This opinion is limited in all respects to the federal laws of the United States of America and the General Corporation Law of the State of Delaware, and no opinion is expressed with respect to the laws of any other jurisdiction or any effect that such laws may have on the opinions expressed herein. This opinion is limited to the matters stated herein, and no opinion is implied or may be inferred beyond the matters expressly stated herein.

Based on the foregoing, and subject to the limitations, qualifications and assumptions set forth herein, we are of the opinion that the Securities are duly authorized and, when the Registration Statement has become effective under the Securities Act and the Securities have been issued in the manner contemplated by and upon the terms and subject to the conditions set forth in the Registration Statement and the Merger Agreement, will be validly issued, fully paid and nonassessable.

This opinion is given as of the date hereof, and we assume no obligation to advise you after the date hereof of facts or circumstances that come to our attention or changes in law that occur which could affect the opinions contained herein. This opinion is being rendered for the benefit of the Company in connection with the matters addressed herein.

We consent to the filing of this opinion with the Commission as an exhibit to the Registration Statement and to the reference to us under the caption “Legal Matters” in the Prospectus that forms a part of the Registration Statement. In giving such consent, we do not admit that we are in the category of persons whose consent is required under Section 7 of the Securities Act.

Very truly yours,

/s/ King & Spalding LLP