FORM 11-K (Mark One)ANNUAL REPORT PURSUANT TO SECTION 15(d) OF THE SECURITIES EXCHANGE ACTOF 1934 For the fiscal year ended December31, 2025 OR TRANSITION REPORT PURSUANT TO SECTION 15(d) OF THE SECURITIES EXCHANGEACT OF 1934 Commission File Number 001-08106 A.Full title of the plan and the address of the plan, if different from that of the issuer Named below: The MasTec, Inc. 401(k) Retirement Plan B.Name of issuer of the securities held pursuant to the plan and the address of its principal executive office: MasTec, Inc.800 S. Douglas Road, 12th FloorCoral Gables, FL 33134 TABLE OF CONTENTS Financial Statements Supplemental Schedules Schedule H, line 4a – Schedule of DelinquentParticipant Contributions for the year ended December 31, 202512Schedule H, line 4i – Schedule of Assets (Held at End of Year) December 31, 202513 Exhibit Index:Ex-23.1 Consent of Independent Registered Public Accounting Firm – BDO USA, P.C. Report of Independent Registered Public Accounting Firm Plan Administrator and ParticipantsThe MasTec, Inc. 401(k) Retirement PlanMiami, Florida Opinion on the Financial Statements We have audited the accompanying statements of net assets available for benefits of The MasTec, Inc. 401(k) Retirement Plan (the“Plan”) as of December31, 2025 and 2024, the related statement of changes in net assets available for benefits for the year endedDecember31, 2025, and the related notes (collectively, the “financial statements”). In our opinion, the financial statements presentfairly, in all material respects, the net assets available for benefits of the Plan as of December31, 2025 and 2024, and the changes in Basis for Opinion These financial statements are the responsibility of the Plan’s management. Our responsibility is to express an opinion on the Plan’sfinancial statements based on our audits. We are a public accounting firm registered with the Public Accounting Oversight Board(United States) (“PCAOB”) and are required to be independent with respect to the Plan in accordance with the U.S. federal securities We conducted our audits in accordance with the standards of the PCAOB. Those standards require that we plan and perform the auditto obtain reasonable assurance about whether the financial statements are free of material misstatement, whether due to error or fraud.The Plan is not required to have, nor were we engaged to perform, an audit of its internal control over financial reporting. As part ofour audits we are required to obtain an understanding of internal control over financial reporting but not for the purpose of expressing Our audits included performing procedures to assess the risk of material misstatement of the financial statements, whether due to erroror fraud, and performing procedures that respond to those risks. Such procedures included examining, on a test basis, evidenceregarding the amounts and disclosures in the financial statements. Our audits also included evaluating the accounting principles usedand significant estimates made by the Plan’s management, as well as evaluating the overall presentation of the financial statements. We Supplemental Information The supplemental information in the accompanying ERISA-required supplemental schedules, Schedule H, line 4a – Schedule ofDelinquent Participant Contributions for the year ended December31, 2025, and Schedule H, line 4i – Schedule of Assets (Held atEnd of Year) as of December31, 2025, have been subjected to audit procedures performed in conjunction with the audit of the Plan’sfinancial statements. The supplemental information is presented for the purpose of additional analysis and is not a required part of thefinancial statements but included supplemental information required by the Department of Labor’s Rules and Regulations forReporting and Disclosure under the Employee Retirement Income Security Act of 1974. The supplemental information is the /s/ BDO USA, P.C. NOTE A — DESCRIPTION OF PLAN Description of the Plan The following description of The MasTec, Inc. 401(k) Retirement Plan (the “Plan”), as amended, provides only general information. Participants should refer to the Plan Document for a more complete description of the Plan’s provisions. General The Plan is a defined contribution plan covering all eligible employees of MasTec, Inc. and its subsidiaries that elect to participate inthe Plan (collectively, the “Company”) who have completed at least one (1) full calendar month of employment. Employees enter thePlan on the first day of the month coinciding with or the next month following the date on which they meet the eligibilityrequirements. The Plan is subject to the provisions of the Employee Retirement Income Security Act of 1974 (“ERISA”), as amended.Effective October 1, 2025, the Plan’s trustee, custodian and recordkeeper was changed from Bank of America Merrill Lynch (“MerrillLynch”) to Schwab Retirement Plan Services, Inc. and Charles Schwab Trust Bank, respectively (collectively, “Schw