EXHIBIT 5.1 May 4, 1999 Mr. Jose M. Sariego Senior Vice President - General Counsel MasTec, Inc. 3155 N.W. 77th Avenue Miami, Florida 33122-1205 Re: MasTec, Inc. REGISTRATION STATEMENT ON FORM S-8 Dear Mr. Sariego: As counsel to MasTec, Inc., a Florida corporation (the "Corporation"), we have examined the Articles of Incorporation and Bylaws of the Corporation, as well as such other documents and proceedings as we have considered necessary for the purposes of this opinion. We have also examined and are familiar with the Corporation's Registration Statement on Form S-8 (the "Registration Statement"), filed with the Securities and Exchange Commission under the Securities Act of 1933, as amended, relating to 1,100,000 shares of the Corporation's common stock, par value $.10 per share (the "Common Stock"), issuable by the Corporation pursuant to the Non-Employee Directors' Stock Plan and the 1999 Non-Qualified Employee Stock Option Plan (the "Plans"). Mr. Jose M. Sariego May 4, 1999 Page 2 In rendering this opinion, we have assumed, without independent investigation: (i) the authenticity of all documents submitted to us as originals; (ii) the conformity to original documents of all documents submitted to us as certified or photostatic copies and (iii) the genuineness of all signatures. In addition, as to questions of fact material to the opinions expressed herein, we have relied upon such certificates of public officials, corporate agents and officers of the Corporation and such other certificates as we deemed relevant. Based upon the foregoing, and having regard to legal considerations which we deem relevant, we are of the opinion that following the issuance and delivery of the Common Stock by the Corporation under the Plan, against payment of adequate consideration therefor to the Corporation in accordance with the terms of the Plans, the Common Stock will be validly issued, fully paid and non-assessable. This opinion is intended solely for the Corporation's use in connection with the registration of the Common Stock and may not be relied upon for any other purpose or by any other person. This opinion may not be quoted in whole or in part or otherwise referred to or furnished to any other person except in response to a valid subpoena. This opinion is limited to the matters expressly stated herein, and no opinion is implied or may be inferred beyond the matters expressly stated herein. This opinion is rendered as of the date hereof, and we assume no obligation to update or supplement such opinion to reflect any facts or circumstances that may hereafter come to our attention or any changes in facts or laws that may hereafter occur. We hereby consent to the inclusion of this opinion letter as an exhibit to the Registration Statement. Very truly yours, STEARNS WEAVER MILLER WEISSLER ALHADEFF & SITTERSON, P.A.