Exhibit 5.1
![LOGO](https://capedge.com/proxy/S-4/0001193125-22-231562/g338793g0823205438383.jpg)
August 26, 2022
MasTec, Inc.
800 South Douglas Road
12th Floor
Coral Gables, Florida 33134
| Re: | MasTec, Inc. Registration Statement on Form S-4 |
Ladies and Gentlemen:
We have acted as legal counsel for MasTec, Inc., a Florida corporation (the “Company”), in connection with the preparation of a Registration Statement on Form S-4 including the prospectus constituting a part thereof (the “Registration Statement”), being filed by the Company with the Securities and Exchange Commission (the “Commission”) under the Securities Act of 1933, as amended (the “Securities Act”), relating to the registration by the Company of shares (the “Shares”) of common stock, par value $0.10 per share, of the Company (“Common Stock”) to be issued in connection with the consummation of the Company’s acquisition (the “Acquisition”) of all of the outstanding shares of Infrastructure and Energy Alternatives, Inc., a Delaware corporation (“IEA”), pursuant to the Agreement and Plan of Merger (the “Merger Agreement”), dated as of July 24, 2022, by and among the Company, IEA and Indigo Acquisition I Corp., a Delaware corporation.
In connection with our representation of the Company, and as a basis for the opinion hereinafter set forth, we have examined originals, or copies certified or otherwise identified to our satisfaction, of the following:
| (1) | the Registration Statement; |
| (2) | the Company’s Articles of Incorporation, as amended to the date hereof (the “Charter”); |
| (3) | the Company’s Amended and Restated Bylaws, as amended to the date hereof (the “Bylaws”); |
| (5) | resolutions adopted by the board of directors of the Company on July 24, 2022 approving the Merger Agreement, the issuance and sale of the Shares pursuant to the Merger Agreement and other related matters; and |
| (6) | such other documents and records and other certificates and instruments and matters of law as we have deemed necessary or appropriate to express the opinion set forth below, subject to the assumptions, limitations and qualifications stated herein. |
In rendering the opinion set forth below, we have assumed the genuineness of all signatures, the legal capacity of natural persons, the authenticity of all documents submitted to us as originals, the conformity to original documents of all documents submitted to us as duplicates or certified or conformed copies, and the authenticity of the originals of such latter documents.
As to matters of fact material to this opinion, we have relied to the extent we deemed reasonably appropriate upon representations or certificates of officers or directors of the Company, without independently verifying the accuracy of such documents, records and instruments.