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>0001340675</cik>
            <ccc>XXXXXXXX</ccc>
          </filerCredentials>
        </filer>
        <liveTestFlag>LIVE</liveTestFlag>
  
  
  
      </filerInfo>
    </headerData>
    <formData>
      <issuerInfo>
        <issuerCik>0001172052</issuerCik>
        <issuerName>SAFETY INSURANCE GROUP INC</issuerName>
        <secFileNumber>000-50070</secFileNumber>
        <issuerAddress>
          <com:street1>20 CUSTOM HOUSE STREET</com:street1>
          <com:city>BOSTON</com:city>
          <com:stateOrCountry>MA</com:stateOrCountry>
          <com:zipCode>02110</com:zipCode>
        </issuerAddress>
        <issuerContactPhone>617-951-0600</issuerContactPhone>
        <nameOfPersonForWhoseAccountTheSecuritiesAreToBeSold>Murphy George</nameOfPersonForWhoseAccountTheSecuritiesAreToBeSold>
        <relationshipsToIssuer>
          <relationshipToIssuer>Officer</relationshipToIssuer>
          <relationshipToIssuer>Director</relationshipToIssuer>
        </relationshipsToIssuer>
      </issuerInfo>
      <securitiesInformation>
        <securitiesClassTitle>Common</securitiesClassTitle>
        <brokerOrMarketmakerDetails>
          <name>Fidelity Brokerage Services LLC</name>
          <address>
            <com:street1>900 Salem Street</com:street1>
            <com:city>Smithfield</com:city>
            <com:stateOrCountry>RI</com:stateOrCountry>
            <com:zipCode>02917</com:zipCode>
          </address>
        </brokerOrMarketmakerDetails>
        <noOfUnitsSold>1530</noOfUnitsSold>
        <aggregateMarketValue>123078.71</aggregateMarketValue>
        <noOfUnitsOutstanding>14791812</noOfUnitsOutstanding>
        <approxSaleDate>03/04/2024</approxSaleDate>
        <securitiesExchangeName>NASDAQ</securitiesExchangeName>
      </securitiesInformation>
      <securitiesToBeSold>
        <securitiesClassTitle>Common</securitiesClassTitle>
        <acquiredDate>02/23/2024</acquiredDate>
        <natureOfAcquisitionTransaction>Restricted Stock Vesting</natureOfAcquisitionTransaction>
        <nameOfPersonfromWhomAcquired>Issuer</nameOfPersonfromWhomAcquired>
        <isGiftTransaction>N</isGiftTransaction>
        <amountOfSecuritiesAcquired>1530</amountOfSecuritiesAcquired>
        <paymentDate>02/23/2024</paymentDate>
        <natureOfPayment>Compensation</natureOfPayment>
      </securitiesToBeSold>
      <nothingToReportFlagOnSecuritiesSoldInPast3Months>N</nothingToReportFlagOnSecuritiesSoldInPast3Months>
      <securitiesSoldInPast3Months>
        <sellerDetails>
          <name>George M. Murphy</name>
          <address>
            <com:street1>20 Custom House Street</com:street1>
            <com:city>Boston</com:city>
            <com:stateOrCountry>MA</com:stateOrCountry>
            <com:zipCode>02110</com:zipCode>
          </address>
        </sellerDetails>
        <securitiesClassTitle>Common</securitiesClassTitle>
        <saleDate>03/01/2024</saleDate>
        <amountOfSecuritiesSold>2077</amountOfSecuritiesSold>
        <grossProceeds>166922.67</grossProceeds>
      </securitiesSoldInPast3Months>
      <noticeSignature>
        <noticeDate>03/04/2024</noticeDate>
        <signature>/s/ Eric Janiak, as a duly authorized representative of Fidelity Brokerage Services LLC, as attorney-in-fact for George M. Murphy</signature>
      </noticeSignature>
    </formData>
  </edgarSubmission>
metadata_documents: [{"type": "144", "sequence": "1", "filename": "primary_doc.xml", "secsgml_size_bytes": 3487}]
text: 144
  0001340675
  XXXXXXXX
  LIVE
  0001172052
  SAFETY INSURANCE GROUP INC
  000-50070
  20 CUSTOM HOUSE STREET
  BOSTON
  MA
  02110
  617-951-0600
  Murphy George
  Officer
  Director
  Common
  Fidelity Brokerage Services LLC
  900 Salem Street
  Smithfield
  RI
  02917
  1530
  123078.71
  14791812
  03/04/2024
  NASDAQ
  Common
  02/23/2024
  Restricted Stock Vesting
  Issuer
  N
  1530
  02/23/2024
  Compensation
  N
  George M. Murphy
  20 Custom House Street
  Boston
  MA
  02110
  Common
  03/01/2024
  2077
  166922.67
  03/04/2024
  /s/ Eric Janiak, as a duly authorized representative of Fidelity Brokerage Services LLC, as attorney-in-fact for George M. Murphy