<?xml version="1.0" encoding="UTF-8"?><edgarSubmission xmlns="http://www.sec.gov/edgar/ownership" xmlns:com="http://www.sec.gov/edgar/common">
  <headerData>
    <submissionType>144</submissionType>
    <filerInfo>
      <filer>
        <filerCredentials>
          <cik>0001728969</cik>
          <ccc>XXXXXXXX</ccc>
        </filerCredentials>
      </filer>
      <liveTestFlag>LIVE</liveTestFlag>



    </filerInfo>
  </headerData>
  <formData>
    <issuerInfo>
      <issuerCik>0000831641</issuerCik>
      <issuerName>TETRA TECH INC</issuerName>
      <secFileNumber>000-19655</secFileNumber>
      <issuerAddress>
        <com:street1>3475 EAST FOOTHILL BOULEVARD</com:street1>
        <com:city>PASADENA</com:city>
        <com:stateOrCountry>CA</com:stateOrCountry>
        <com:zipCode>91107</com:zipCode>
      </issuerAddress>
      <issuerContactPhone>6263514664</issuerContactPhone>
      <nameOfPersonForWhoseAccountTheSecuritiesAreToBeSold>Hopson Preston III</nameOfPersonForWhoseAccountTheSecuritiesAreToBeSold>
      <relationshipsToIssuer>
        <relationshipToIssuer>Director</relationshipToIssuer>
      </relationshipsToIssuer>
    </issuerInfo>
    <securitiesInformation>
      <securitiesClassTitle>Common</securitiesClassTitle>
      <brokerOrMarketmakerDetails>
        <name>The Charles Schwab Corporation</name>
        <address>
          <com:street1>3000 Schwab Way</com:street1>
          <com:city>Westlake</com:city>
          <com:stateOrCountry>TX</com:stateOrCountry>
          <com:zipCode>76262</com:zipCode>
        </address>
      </brokerOrMarketmakerDetails>
      <noOfUnitsSold>5000</noOfUnitsSold>
      <aggregateMarketValue>1165316.77</aggregateMarketValue>
      <noOfUnitsOutstanding>53532413</noOfUnitsOutstanding>
      <approxSaleDate>08/06/2024</approxSaleDate>
      <securitiesExchangeName>NASDAQ</securitiesExchangeName>
    </securitiesInformation>
    <securitiesToBeSold>
      <securitiesClassTitle>Common</securitiesClassTitle>
      <acquiredDate>11/15/2020</acquiredDate>
      <natureOfAcquisitionTransaction>Restricted Stock Award</natureOfAcquisitionTransaction>
      <nameOfPersonfromWhomAcquired>Issuer</nameOfPersonfromWhomAcquired>
      <isGiftTransaction>N</isGiftTransaction>
      <amountOfSecuritiesAcquired>407</amountOfSecuritiesAcquired>
      <paymentDate>11/15/2020</paymentDate>
      <natureOfPayment>Restricted Stock Award</natureOfPayment>
    </securitiesToBeSold>
    <securitiesToBeSold>
      <securitiesClassTitle>Common</securitiesClassTitle>
      <acquiredDate>11/15/2021</acquiredDate>
      <natureOfAcquisitionTransaction>Restricted Stock Award</natureOfAcquisitionTransaction>
      <nameOfPersonfromWhomAcquired>Issuer</nameOfPersonfromWhomAcquired>
      <isGiftTransaction>N</isGiftTransaction>
      <amountOfSecuritiesAcquired>1438</amountOfSecuritiesAcquired>
      <paymentDate>11/15/2021</paymentDate>
      <natureOfPayment>Restricted Stock Award</natureOfPayment>
    </securitiesToBeSold>
    <securitiesToBeSold>
      <securitiesClassTitle>Common</securitiesClassTitle>
      <acquiredDate>11/16/2022</acquiredDate>
      <natureOfAcquisitionTransaction>Restricted Stock Award</natureOfAcquisitionTransaction>
      <nameOfPersonfromWhomAcquired>Issuer</nameOfPersonfromWhomAcquired>
      <isGiftTransaction>N</isGiftTransaction>
      <amountOfSecuritiesAcquired>3155</amountOfSecuritiesAcquired>
      <paymentDate>11/16/2022</paymentDate>
      <natureOfPayment>Restricted Stock Award</natureOfPayment>
    </securitiesToBeSold>
    <nothingToReportFlagOnSecuritiesSoldInPast3Months>Y</nothingToReportFlagOnSecuritiesSoldInPast3Months>
    <remarks>Shares being sold out of account titled: Preston Hopson III Ttee Preston Hopson Revocable Trust U/A Dtd 09/01/2020.

</remarks>
    <noticeSignature>
      <noticeDate>08/07/2024</noticeDate>
      <signature>Preston Hopson III</signature>
    </noticeSignature>
  </formData>
</edgarSubmission>
[{"type": "144", "sequence": "1", "filename": "primary_doc.xml", "secsgml_size_bytes": 3964}]
144
0001728969
XXXXXXXX
LIVE
0000831641
TETRA TECH INC
000-19655
3475 EAST FOOTHILL BOULEVARD
PASADENA
CA
91107
6263514664
Hopson Preston III
Director
Common
The Charles Schwab Corporation
3000 Schwab Way
Westlake
TX
76262
5000
1165316.77
53532413
08/06/2024
NASDAQ
Common
11/15/2020
Restricted Stock Award
Issuer
N
407
11/15/2020
Restricted Stock Award
Common
11/15/2021
Restricted Stock Award
Issuer
N
1438
11/15/2021
Restricted Stock Award
Common
11/16/2022
Restricted Stock Award
Issuer
N
3155
11/16/2022
Restricted Stock Award
Y
Shares being sold out of account titled: Preston Hopson III Ttee Preston Hopson Revocable Trust U/A Dtd 09/01/2020.
08/07/2024
Preston Hopson III