EXHIBIT 5.1 LAW OFFICES STEARNS WEAVER MILLER WEISSLER ALHADEFF & SITTERSON, P.A. MUSEUM TOWER 150 WEST FLAGLER STREET MIAMI, FLORIDA 33130 --------- MIAMI (305) 789-3200 o BROWARD (954) 463-5440 FAX (305) 789-3395 E. RICHARD ALHADEFF THEODORE A. JEWELL BETTY CHANG ROWE OWEN S. FREED LOUISE JACOWITZ ALLEN SHARON LEE JOHNSON STEVEN D. RUBIN SENIOR COUNSEL STUART D. AMES MICHAEL I. KEYES MIMI L. SALL LAWRENCE J. BAILIN ROBERT T. KOFMAN NICOLE S. SAYFIE DAVID M. SMITH AMANDA C. BARRY CHAD K. LANG RICHARD E. SCHATZ LAND USE CONSULTANT PATRICK A. BARRY PAUL TAGER LEHR LESTER E. SEGAL SHAWN BAYNE VERNON L. LEWIS DAVID M. SEIFER SUSAN FLEMING BENNETT TERRY M. LOVELL JOSE G. SEPULVEDA TAMPA OFFICE LISA K. BERG JOY SPILLIS LUNDEEN JAY B. SHAPIRO SUITE 2200 MARK J. BERNET GEOFFREY MacDONALD MARTIN S. SIMKOVIC SUNTRUST FINANCIAL CENTRE HANS C. BEYER MICHAEL C. MARSH CURTIS H. SITTERSON 401 EAST JACKSON STREET STEPHEN R. CALKINS BRIAN J. McDONOUGH RONNI D. SOLOMON TAMPA, FLORIDA 33602 ELLEN I. CHO ANTONIO R. MENENDEZ MARK D. SOLOV SETH THOMAS CRAINE FRANCISCO J. MENENDEZ EUGENE E. STEARNS (813) 223-4800 PETER L. DESIDERIO ALISON W. MILLER JENNIFER D. STEARNS MARK P. DIKEMAN VICKI LYNN MONROE BRADFORD SWING DREW M. DILLWORTH HAROLD D. MOOREFIELD, JR. SUSAN J. TOEPFER FORT LAUDERDALE OFFICE SHARON QUINN DIXON JOHN N. MURATIDES ANNETTE TORRES SUITE 1900 ALAN H. FEIN JOHN K. OLSON DENNIS R. TURNER 200 EAST BROWARD BOULEVARD ANGELO M. FILIPPI JAY P. W. PHILP RONALD L. WEAVER FORT LAUDERDALE, FLORIDA 33301 ANDREA F. FISHER KARA E. PLUNKETT ROBERT I. WEISSLER ROBERT E. GALLAGHER, JR. DAVID C. POLLACK PATRICIA G. WELLES (954) 462-9500 CHAVA E. GENET DARRIN J. QUAM THOMAS H. WILLIAMS, JR. LATASHA A. GETHERS JOHN M. RAWICZ MARTIN B. WOODS PATRICIA K. GREEN PATRICIA A. REDMOND JOSEPH K. HALL ELIZABETH G. RICE ALICE R. HUNEYCUTT GLENN M. RISSMAN RICHARD B. JACKSON DAVID A. ROTHSTEIN May 25, 1999 Mr. Jose M. Sariego Senior Vice President - General Counsel MasTec, Inc. 3155 N.W. 77th Avenue Miami, Florida 33122-1205 Re: Registration Statement on Form S-4 (REGISTRATION NO. 333- ) OF MASTEC, INC. 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 above referenced registration statement relating to the sale by the Corporation of up to 2,000,000 shares of the Corporation's common stock, par value $.10 per share (the "Shares"). 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. STEARNS WEAVER MILLER WEISSLER ALHADEFF & SITTERSON, P.A. Mr. Jose M. Sariego May 25, 1999 Page 2 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 Shares by the Corporation, against payment of adequate consideration therefor to the Corporation, the Shares 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 Shares 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 law 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. STEARNS WEAVER MILLER WEISSLER ALHADEFF & SITTERSON, P.A.