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>0001469168</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>Hadley Randall D.</nameOfPersonForWhoseAccountTheSecuritiesAreToBeSold>
        <relationshipsToIssuer>
          <relationshipToIssuer>Former Director</relationshipToIssuer>
        </relationshipsToIssuer>
      </issuerInfo>
      <securitiesInformation>
        <securitiesClassTitle>Common Shares</securitiesClassTitle>
        <brokerOrMarketmakerDetails>
          <name>Merrill Lynch</name>
          <address>
            <com:street1>225 Liberty St</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>35000</noOfUnitsSold>
        <aggregateMarketValue>493403.16</aggregateMarketValue>
        <noOfUnitsOutstanding>86860960</noOfUnitsOutstanding>
        <approxSaleDate>08/29/2024</approxSaleDate>
        <securitiesExchangeName>NYSE</securitiesExchangeName>
      </securitiesInformation>
      <securitiesToBeSold>
        <securitiesClassTitle>Common Shares</securitiesClassTitle>
        <acquiredDate>05/16/2016</acquiredDate>
        <natureOfAcquisitionTransaction>Vesting of restricted stock unit award</natureOfAcquisitionTransaction>
        <nameOfPersonfromWhomAcquired>PennyMac Mortgage Investment Trust</nameOfPersonfromWhomAcquired>
        <isGiftTransaction>N</isGiftTransaction>
        <amountOfSecuritiesAcquired>417</amountOfSecuritiesAcquired>
        <paymentDate>05/16/2016</paymentDate>
        <natureOfPayment>Granted as part of issuer equity compensation plan</natureOfPayment>
      </securitiesToBeSold>
      <securitiesToBeSold>
        <securitiesClassTitle>Common Shares</securitiesClassTitle>
        <acquiredDate>06/03/2016</acquiredDate>
        <natureOfAcquisitionTransaction>Vesting of restricted stock unit award</natureOfAcquisitionTransaction>
        <nameOfPersonfromWhomAcquired>PennyMac Mortgage Investment Trust</nameOfPersonfromWhomAcquired>
        <isGiftTransaction>N</isGiftTransaction>
        <amountOfSecuritiesAcquired>1377</amountOfSecuritiesAcquired>
        <paymentDate>06/03/2016</paymentDate>
        <natureOfPayment>Granted as part of issuer equity compensation plan</natureOfPayment>
      </securitiesToBeSold>
      <securitiesToBeSold>
        <securitiesClassTitle>Common Shares</securitiesClassTitle>
        <acquiredDate>02/23/2017</acquiredDate>
        <natureOfAcquisitionTransaction>Vesting of restricted stock unit award</natureOfAcquisitionTransaction>
        <nameOfPersonfromWhomAcquired>PennyMac Mortgage Investment Trust</nameOfPersonfromWhomAcquired>
        <isGiftTransaction>N</isGiftTransaction>
        <amountOfSecuritiesAcquired>2375</amountOfSecuritiesAcquired>
        <paymentDate>02/23/2017</paymentDate>
        <natureOfPayment>Granted as part of issuer equity compensation plan</natureOfPayment>
      </securitiesToBeSold>
      <securitiesToBeSold>
        <securitiesClassTitle>Common Shares</securitiesClassTitle>
        <acquiredDate>02/24/2017</acquiredDate>
        <natureOfAcquisitionTransaction>Vesting of restricted stock unit award</natureOfAcquisitionTransaction>
        <nameOfPersonfromWhomAcquired>PennyMac Mortgage Investment Trust</nameOfPersonfromWhomAcquired>
        <isGiftTransaction>N</isGiftTransaction>
        <amountOfSecuritiesAcquired>1358</amountOfSecuritiesAcquired>
        <paymentDate>02/24/2017</paymentDate>
        <natureOfPayment>Granted as part of issuer equity compensation plan</natureOfPayment>
      </securitiesToBeSold>
      <securitiesToBeSold>
        <securitiesClassTitle>Common Shares</securitiesClassTitle>
        <acquiredDate>06/03/2017</acquiredDate>
        <natureOfAcquisitionTransaction>Vesting of restricted stock unit award</natureOfAcquisitionTransaction>
        <nameOfPersonfromWhomAcquired>PennyMac Mortgage Investment Trust</nameOfPersonfromWhomAcquired>
        <isGiftTransaction>N</isGiftTransaction>
        <amountOfSecuritiesAcquired>1378</amountOfSecuritiesAcquired>
        <paymentDate>06/03/2017</paymentDate>
        <natureOfPayment>Granted as part of issuer equity compensation plan</natureOfPayment>
      </securitiesToBeSold>
      <securitiesToBeSold>
        <securitiesClassTitle>Common Shares</securitiesClassTitle>
        <acquiredDate>02/23/2018</acquiredDate>
        <natureOfAcquisitionTransaction>Vesting of restricted stock unit award</natureOfAcquisitionTransaction>
        <nameOfPersonfromWhomAcquired>PennyMac Mortgage Investment Trust</nameOfPersonfromWhomAcquired>
        <isGiftTransaction>N</isGiftTransaction>
        <amountOfSecuritiesAcquired>4076</amountOfSecuritiesAcquired>
        <paymentDate>02/23/2018</paymentDate>
        <natureOfPayment>Granted as part of issuer equity compensation plan</natureOfPayment>
      </securitiesToBeSold>
      <securitiesToBeSold>
        <securitiesClassTitle>Common Shares</securitiesClassTitle>
        <acquiredDate>02/24/2018</acquiredDate>
        <natureOfAcquisitionTransaction>Vesting of restricted stock unit award</natureOfAcquisitionTransaction>
        <nameOfPersonfromWhomAcquired>PennyMac Mortgage Investment Trust</nameOfPersonfromWhomAcquired>
        <isGiftTransaction>N</isGiftTransaction>
        <amountOfSecuritiesAcquired>1358</amountOfSecuritiesAcquired>
        <paymentDate>02/24/2018</paymentDate>
        <natureOfPayment>Granted as part of issuer equity compensation plan</natureOfPayment>
      </securitiesToBeSold>
      <securitiesToBeSold>
        <securitiesClassTitle>Common Shares</securitiesClassTitle>
        <acquiredDate>02/23/2019</acquiredDate>
        <natureOfAcquisitionTransaction>Vesting of restricted stock unit award</natureOfAcquisitionTransaction>
        <nameOfPersonfromWhomAcquired>PennyMac Mortgage Investment Trust</nameOfPersonfromWhomAcquired>
        <isGiftTransaction>N</isGiftTransaction>
        <amountOfSecuritiesAcquired>4077</amountOfSecuritiesAcquired>
        <paymentDate>02/23/2019</paymentDate>
        <natureOfPayment>Granted as part of issuer equity compensation plan</natureOfPayment>
      </securitiesToBeSold>
      <securitiesToBeSold>
        <securitiesClassTitle>Common Shares</securitiesClassTitle>
        <acquiredDate>03/12/2019</acquiredDate>
        <natureOfAcquisitionTransaction>Vesting of restricted stock unit award</natureOfAcquisitionTransaction>
        <nameOfPersonfromWhomAcquired>PennyMac Mortgage Investment Trust</nameOfPersonfromWhomAcquired>
        <isGiftTransaction>N</isGiftTransaction>
        <amountOfSecuritiesAcquired>1644</amountOfSecuritiesAcquired>
        <paymentDate>03/12/2019</paymentDate>
        <natureOfPayment>Granted as part of issuer equity compensation plan</natureOfPayment>
      </securitiesToBeSold>
      <securitiesToBeSold>
        <securitiesClassTitle>Common Shares</securitiesClassTitle>
        <acquiredDate>02/12/2020</acquiredDate>
        <natureOfAcquisitionTransaction>Vesting of restricted stock unit award</natureOfAcquisitionTransaction>
        <nameOfPersonfromWhomAcquired>PennyMac Mortgage Investment Trust</nameOfPersonfromWhomAcquired>
        <isGiftTransaction>N</isGiftTransaction>
        <amountOfSecuritiesAcquired>1493</amountOfSecuritiesAcquired>
        <paymentDate>02/12/2020</paymentDate>
        <natureOfPayment>Granted as part of issuer equity compensation plan</natureOfPayment>
      </securitiesToBeSold>
      <securitiesToBeSold>
        <securitiesClassTitle>Common Shares</securitiesClassTitle>
        <acquiredDate>02/23/2020</acquiredDate>
        <natureOfAcquisitionTransaction>Vesting of restricted stock unit award</natureOfAcquisitionTransaction>
        <nameOfPersonfromWhomAcquired>PennyMac Mortgage Investment Trust</nameOfPersonfromWhomAcquired>
        <isGiftTransaction>N</isGiftTransaction>
        <amountOfSecuritiesAcquired>1702</amountOfSecuritiesAcquired>
        <paymentDate>02/23/2020</paymentDate>
        <natureOfPayment>Granted as part of issuer equity compensation plan</natureOfPayment>
      </securitiesToBeSold>
      <securitiesToBeSold>
        <securitiesClassTitle>Common Shares</securitiesClassTitle>
        <acquiredDate>03/12/2020</acquiredDate>
        <natureOfAcquisitionTransaction>Vesting of restricted stock unit award</natureOfAcquisitionTransaction>
        <nameOfPersonfromWhomAcquired>PennyMac Mortgage Investment Trust</nameOfPersonfromWhomAcquired>
        <isGiftTransaction>N</isGiftTransaction>
        <amountOfSecuritiesAcquired>1645</amountOfSecuritiesAcquired>
        <paymentDate>03/12/2020</paymentDate>
        <natureOfPayment>Granted as part of issuer equity compensation plan</natureOfPayment>
      </securitiesToBeSold>
      <securitiesToBeSold>
        <securitiesClassTitle>Common Shares</securitiesClassTitle>
        <acquiredDate>02/12/2021</acquiredDate>
        <natureOfAcquisitionTransaction>Vesting of restricted stock unit award</natureOfAcquisitionTransaction>
        <nameOfPersonfromWhomAcquired>PennyMac Mortgage Investment Trust</nameOfPersonfromWhomAcquired>
        <isGiftTransaction>N</isGiftTransaction>
        <amountOfSecuritiesAcquired>1494</amountOfSecuritiesAcquired>
        <paymentDate>02/12/2021</paymentDate>
        <natureOfPayment>Granted as part of issuer equity compensation plan</natureOfPayment>
      </securitiesToBeSold>
      <securitiesToBeSold>
        <securitiesClassTitle>Common Shares</securitiesClassTitle>
        <acquiredDate>03/03/2021</acquiredDate>
        <natureOfAcquisitionTransaction>Vesting of restricted stock unit award</natureOfAcquisitionTransaction>
        <nameOfPersonfromWhomAcquired>PennyMac Mortgage Investment Trust</nameOfPersonfromWhomAcquired>
        <isGiftTransaction>N</isGiftTransaction>
        <amountOfSecuritiesAcquired>1419</amountOfSecuritiesAcquired>
        <paymentDate>03/03/2021</paymentDate>
        <natureOfPayment>Granted as part of issuer equity compensation plan</natureOfPayment>
      </securitiesToBeSold>
      <securitiesToBeSold>
        <securitiesClassTitle>Common Shares</securitiesClassTitle>
        <acquiredDate>03/12/2021</acquiredDate>
        <natureOfAcquisitionTransaction>Vesting of restricted stock unit award</natureOfAcquisitionTransaction>
        <nameOfPersonfromWhomAcquired>PennyMac Mortgage Investment Trust</nameOfPersonfromWhomAcquired>
        <isGiftTransaction>N</isGiftTransaction>
        <amountOfSecuritiesAcquired>1645</amountOfSecuritiesAcquired>
        <paymentDate>03/12/2021</paymentDate>
        <natureOfPayment>Granted as part of issuer equity compensation plan</natureOfPayment>
      </securitiesToBeSold>
      <securitiesToBeSold>
        <securitiesClassTitle>Common Shares</securitiesClassTitle>
        <acquiredDate>02/12/2022</acquiredDate>
        <natureOfAcquisitionTransaction>Vesting of restricted stock unit award</natureOfAcquisitionTransaction>
        <nameOfPersonfromWhomAcquired>PennyMac Mortgage Investment Trust</nameOfPersonfromWhomAcquired>
        <isGiftTransaction>N</isGiftTransaction>
        <amountOfSecuritiesAcquired>1494</amountOfSecuritiesAcquired>
        <paymentDate>02/12/2022</paymentDate>
        <natureOfPayment>Granted as part of issuer equity compensation plan</natureOfPayment>
      </securitiesToBeSold>
      <securitiesToBeSold>
        <securitiesClassTitle>Common Shares</securitiesClassTitle>
        <acquiredDate>02/17/2022</acquiredDate>
        <natureOfAcquisitionTransaction>Vesting of restricted stock unit award</natureOfAcquisitionTransaction>
        <nameOfPersonfromWhomAcquired>PennyMac Mortgage Investment Trust</nameOfPersonfromWhomAcquired>
        <isGiftTransaction>N</isGiftTransaction>
        <amountOfSecuritiesAcquired>1785</amountOfSecuritiesAcquired>
        <paymentDate>02/17/2022</paymentDate>
        <natureOfPayment>Granted as part of issuer equity compensation plan</natureOfPayment>
      </securitiesToBeSold>
      <securitiesToBeSold>
        <securitiesClassTitle>Common Shares</securitiesClassTitle>
        <acquiredDate>03/03/2022</acquiredDate>
        <natureOfAcquisitionTransaction>Vesting of restricted stock unit award</natureOfAcquisitionTransaction>
        <nameOfPersonfromWhomAcquired>PennyMac Mortgage Investment Trust</nameOfPersonfromWhomAcquired>
        <isGiftTransaction>N</isGiftTransaction>
        <amountOfSecuritiesAcquired>1420</amountOfSecuritiesAcquired>
        <paymentDate>03/03/2022</paymentDate>
        <natureOfPayment>Granted as part of issuer equity compensation plan</natureOfPayment>
      </securitiesToBeSold>
      <securitiesToBeSold>
        <securitiesClassTitle>Common Shares</securitiesClassTitle>
        <acquiredDate>02/17/2023</acquiredDate>
        <natureOfAcquisitionTransaction>Vesting of restricted stock unit award</natureOfAcquisitionTransaction>
        <nameOfPersonfromWhomAcquired>PennyMac Mortgage Investment Trust</nameOfPersonfromWhomAcquired>
        <isGiftTransaction>N</isGiftTransaction>
        <amountOfSecuritiesAcquired>1786</amountOfSecuritiesAcquired>
        <paymentDate>02/17/2023</paymentDate>
        <natureOfPayment>Granted as part of issuer equity compensation plan</natureOfPayment>
      </securitiesToBeSold>
      <securitiesToBeSold>
        <securitiesClassTitle>Common Shares</securitiesClassTitle>
        <acquiredDate>02/25/2023</acquiredDate>
        <natureOfAcquisitionTransaction>Vesting of restricted stock unit award</natureOfAcquisitionTransaction>
        <nameOfPersonfromWhomAcquired>PennyMac Mortgage Investment Trust</nameOfPersonfromWhomAcquired>
        <isGiftTransaction>N</isGiftTransaction>
        <amountOfSecuritiesAcquired>1057</amountOfSecuritiesAcquired>
        <paymentDate>02/25/2023</paymentDate>
        <natureOfPayment>Granted as part of issuer equity compensation plan</natureOfPayment>
      </securitiesToBeSold>
      <nothingToReportFlagOnSecuritiesSoldInPast3Months>Y</nothingToReportFlagOnSecuritiesSoldInPast3Months>
      <noticeSignature>
        <noticeDate>08/29/2024</noticeDate>
        <signature>Randall Hadley</signature>
      </noticeSignature>
    </formData>
  </edgarSubmission>
metadata_documents: [{"type": "144", "sequence": "1", "filename": "primary_doc.xml", "secsgml_size_bytes": 14743}]
text: 144
  0001469168
  XXXXXXXX
  LIVE
  0001464423
  PennyMac Mortgage Investment Trust
  001-34416
  3043 TOWNSGATE ROAD
  WESTLAKE VILLAGE
  CA
  91361
  (818) 224-7442
  Hadley Randall D.
  Former Director
  Common Shares
  Merrill Lynch
  225 Liberty St
  Floor 37
  New York
  NY
  10281
  35000
  493403.16
  86860960
  08/29/2024
  NYSE
  Common Shares
  05/16/2016
  Vesting of restricted stock unit award
  PennyMac Mortgage Investment Trust
  N
  417
  05/16/2016
  Granted as part of issuer equity compensation plan
  Common Shares
  06/03/2016
  Vesting of restricted stock unit award
  PennyMac Mortgage Investment Trust
  N
  1377
  06/03/2016
  Granted as part of issuer equity compensation plan
  Common Shares
  02/23/2017
  Vesting of restricted stock unit award
  PennyMac Mortgage Investment Trust
  N
  2375
  02/23/2017
  Granted as part of issuer equity compensation plan
  Common Shares
  02/24/2017
  Vesting of restricted stock unit award
  PennyMac Mortgage Investment Trust
  N
  1358
  02/24/2017
  Granted as part of issuer equity compensation plan
  Common Shares
  06/03/2017
  Vesting of restricted stock unit award
  PennyMac Mortgage Investment Trust
  N
  1378
  06/03/2017
  Granted as part of issuer equity compensation plan
  Common Shares
  02/23/2018
  Vesting of restricted stock unit award
  PennyMac Mortgage Investment Trust
  N
  4076
  02/23/2018
  Granted as part of issuer equity compensation plan
  Common Shares
  02/24/2018
  Vesting of restricted stock unit award
  PennyMac Mortgage Investment Trust
  N
  1358
  02/24/2018
  Granted as part of issuer equity compensation plan
  Common Shares
  02/23/2019
  Vesting of restricted stock unit award
  PennyMac Mortgage Investment Trust
  N
  4077
  02/23/2019
  Granted as part of issuer equity compensation plan
  Common Shares
  03/12/2019
  Vesting of restricted stock unit award
  PennyMac Mortgage Investment Trust
  N
  1644
  03/12/2019
  Granted as part of issuer equity compensation plan
  Common Shares
  02/12/2020
  Vesting of restricted stock unit award
  PennyMac Mortgage Investment Trust
  N
  1493
  02/12/2020
  Granted as part of issuer equity compensation plan
  Common Shares
  02/23/2020
  Vesting of restricted stock unit award
  PennyMac Mortgage Investment Trust
  N
  1702
  02/23/2020
  Granted as part of issuer equity compensation plan
  Common Shares
  03/12/2020
  Vesting of restricted stock unit award
  PennyMac Mortgage Investment Trust
  N
  1645
  03/12/2020
  Granted as part of issuer equity compensation plan
  Common Shares
  02/12/2021
  Vesting of restricted stock unit award
  PennyMac Mortgage Investment Trust
  N
  1494
  02/12/2021
  Granted as part of issuer equity compensation plan
  Common Shares
  03/03/2021
  Vesting of restricted stock unit award
  PennyMac Mortgage Investment Trust
  N
  1419
  03/03/2021
  Granted as part of issuer equity compensation plan
  Common Shares
  03/12/2021
  Vesting of restricted stock unit award
  PennyMac Mortgage Investment Trust
  N
  1645
  03/12/2021
  Granted as part of issuer equity compensation plan
  Common Shares
  02/12/2022
  Vesting of restricted stock unit award
  PennyMac Mortgage Investment Trust
  N
  1494
  02/12/2022
  Granted as part of issuer equity compensation plan
  Common Shares
  02/17/2022
  Vesting of restricted stock unit award
  PennyMac Mortgage Investment Trust
  N
  1785
  02/17/2022
  Granted as part of issuer equity compensation plan
  Common Shares
  03/03/2022
  Vesting of restricted stock unit award
  PennyMac Mortgage Investment Trust
  N
  1420
  03/03/2022
  Granted as part of issuer equity compensation plan
  Common Shares
  02/17/2023
  Vesting of restricted stock unit award
  PennyMac Mortgage Investment Trust
  N
  1786
  02/17/2023
  Granted as part of issuer equity compensation plan
  Common Shares
  02/25/2023
  Vesting of restricted stock unit award
  PennyMac Mortgage Investment Trust
  N
  1057
  02/25/2023
  Granted as part of issuer equity compensation plan
  Y
  08/29/2024
  Randall Hadley