content: <?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>0001469174</cik>
            <ccc>XXXXXXXX</ccc>
          </filerCredentials>
        </filer>
        <liveTestFlag>LIVE</liveTestFlag>
  
  
  
      </filerInfo>
    </headerData>
    <formData>
      <issuerInfo>
        <issuerCik>0001464423</issuerCik>
        <issuerName>PennyMac Mortgage Investment Trust</issuerName>
        <secFileNumber>001-34416</secFileNumber>
        <issuerAddress>
          <com:street1>3043 TOWNSGATE ROAD</com:street1>
          <com:city>WESTLAKE VILLAGE</com:city>
          <com:stateOrCountry>CA</com:stateOrCountry>
          <com:zipCode>91361</com:zipCode>
        </issuerAddress>
        <issuerContactPhone>(818) 224-7442</issuerContactPhone>
        <nameOfPersonForWhoseAccountTheSecuritiesAreToBeSold>Stewart Stacey D.</nameOfPersonForWhoseAccountTheSecuritiesAreToBeSold>
        <relationshipsToIssuer>
          <relationshipToIssuer>Director</relationshipToIssuer>
        </relationshipsToIssuer>
      </issuerInfo>
      <securitiesInformation>
        <securitiesClassTitle>Common Shares of Beneficial Interest</securitiesClassTitle>
        <brokerOrMarketmakerDetails>
          <name>Merrill Lynch</name>
          <address>
            <com:street1>225 Liberty Street</com:street1>
            <com:street2>Floor 37</com:street2>
            <com:city>New York</com:city>
            <com:stateOrCountry>NY</com:stateOrCountry>
            <com:zipCode>10281</com:zipCode>
          </address>
        </brokerOrMarketmakerDetails>
        <noOfUnitsSold>839</noOfUnitsSold>
        <aggregateMarketValue>11536.25</aggregateMarketValue>
        <noOfUnitsOutstanding>86624044</noOfUnitsOutstanding>
        <approxSaleDate>02/21/2024</approxSaleDate>
        <securitiesExchangeName>NYSE</securitiesExchangeName>
      </securitiesInformation>
      <securitiesToBeSold>
        <securitiesClassTitle>Common Shares of Beneficial Interest</securitiesClassTitle>
        <acquiredDate>02/17/2024</acquiredDate>
        <natureOfAcquisitionTransaction>Vesting of restricted stock unit award</natureOfAcquisitionTransaction>
        <nameOfPersonfromWhomAcquired>PennyMac Mortgage Investment Trust</nameOfPersonfromWhomAcquired>
        <isGiftTransaction>N</isGiftTransaction>
        <amountOfSecuritiesAcquired>839</amountOfSecuritiesAcquired>
        <paymentDate>02/17/2024</paymentDate>
        <natureOfPayment>Granted as part of issuer equity compensation plan</natureOfPayment>
      </securitiesToBeSold>
      <nothingToReportFlagOnSecuritiesSoldInPast3Months>Y</nothingToReportFlagOnSecuritiesSoldInPast3Months>
      <noticeSignature>
        <noticeDate>02/21/2024</noticeDate>
        <planAdoptionDates>
          <planAdoptionDate>02/07/2022</planAdoptionDate>
        </planAdoptionDates>
        <signature>Stacey Stewart</signature>
      </noticeSignature>
    </formData>
  </edgarSubmission>
metadata_documents: [{"type": "144", "sequence": "1", "filename": "primary_doc.xml", "secsgml_size_bytes": 3017}]
text: 144
  0001469174
  XXXXXXXX
  LIVE
  0001464423
  PennyMac Mortgage Investment Trust
  001-34416
  3043 TOWNSGATE ROAD
  WESTLAKE VILLAGE
  CA
  91361
  (818) 224-7442
  Stewart Stacey D.
  Director
  Common Shares of Beneficial Interest
  Merrill Lynch
  225 Liberty Street
  Floor 37
  New York
  NY
  10281
  839
  11536.25
  86624044
  02/21/2024
  NYSE
  Common Shares of Beneficial Interest
  02/17/2024
  Vesting of restricted stock unit award
  PennyMac Mortgage Investment Trust
  N
  839
  02/17/2024
  Granted as part of issuer equity compensation plan
  Y
  02/21/2024
  02/07/2022
  Stacey Stewart