<?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>0001207854</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>BATRACK DAN L</nameOfPersonForWhoseAccountTheSecuritiesAreToBeSold>
      <relationshipsToIssuer>
        <relationshipToIssuer>Officer</relationshipToIssuer>
      </relationshipsToIssuer>
    </issuerInfo>
    <securitiesInformation>
      <securitiesClassTitle>Common</securitiesClassTitle>
      <brokerOrMarketmakerDetails>
        <name>Charles Schwab Corp</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>17924</noOfUnitsSold>
      <aggregateMarketValue>4148509.80</aggregateMarketValue>
      <noOfUnitsOutstanding>53532413</noOfUnitsOutstanding>
      <approxSaleDate>08/06/2024</approxSaleDate>
      <securitiesExchangeName>Nasdaq</securitiesExchangeName>
    </securitiesInformation>
    <securitiesToBeSold>
      <securitiesClassTitle>Common</securitiesClassTitle>
      <acquiredDate>12/10/2007</acquiredDate>
      <natureOfAcquisitionTransaction>Compensation</natureOfAcquisitionTransaction>
      <nameOfPersonfromWhomAcquired>Issuer</nameOfPersonfromWhomAcquired>
      <isGiftTransaction>N</isGiftTransaction>
      <amountOfSecuritiesAcquired>17924</amountOfSecuritiesAcquired>
      <paymentDate>12/10/2007</paymentDate>
      <natureOfPayment>N/A</natureOfPayment>
    </securitiesToBeSold>
    <nothingToReportFlagOnSecuritiesSoldInPast3Months>Y</nothingToReportFlagOnSecuritiesSoldInPast3Months>
    <remarks>Mr. Batrack purchased his shares in 2 tranches listed below 12/10/07 8825 shares at $20.80 12/5/08 9099 shares at $18.17
Shares are being sold from acct titled: Danny Lee Batrack TTEE The Danny Lee Batrack and Darwisa J Batrack Trust</remarks>
    <noticeSignature>
      <noticeDate>08/06/2024</noticeDate>
      <signature>Danny Batrack</signature>
    </noticeSignature>
  </formData>
</edgarSubmission>
[{"type": "144", "sequence": "1", "filename": "primary_doc.xml", "secsgml_size_bytes": 2940}]
144
0001207854
XXXXXXXX
LIVE
0000831641
TETRA TECH INC
000-19655
3475 EAST FOOTHILL BOULEVARD
PASADENA
CA
91107
6263514664
BATRACK DAN L
Officer
Common
Charles Schwab Corp
3000 Schwab Way
Westlake
TX
76262
17924
4148509.80
53532413
08/06/2024
Nasdaq
Common
12/10/2007
Compensation
Issuer
N
17924
12/10/2007
N/A
Y
Mr. Batrack purchased his shares in 2 tranches listed below 12/10/07 8825 shares at $20.80 12/5/08 9099 shares at $18.17
Shares are being sold from acct titled: Danny Lee Batrack TTEE The Danny Lee Batrack and Darwisa J Batrack Trust
08/06/2024
Danny Batrack