<?xml version="1.0"?>
<ownershipDocument>

    <schemaVersion>X0508</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2024-03-04</periodOfReport>

    <issuer>
        <issuerCik>0001675033</issuerCik>
        <issuerName>Great Elm Capital Corp.</issuerName>
        <issuerTradingSymbol>GECC</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001831096</rptOwnerCik>
            <rptOwnerName>Great Elm Group, Inc.</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>800 SOUTH STREET, SUITE 230</rptOwnerStreet1>
            <rptOwnerStreet2></rptOwnerStreet2>
            <rptOwnerCity>WALTHAM</rptOwnerCity>
            <rptOwnerState>MA</rptOwnerState>
            <rptOwnerZipCode>02453</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isTenPercentOwner>true</isTenPercentOwner>
        </reportingOwnerRelationship>
    </reportingOwner>

    <aff10b5One>false</aff10b5One>

    <nonDerivativeTable>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <transactionDate>
                <value>2024-03-04</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>J</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
                <footnoteId id="F1"/>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>1239</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>10.82</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>1516932</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
    </nonDerivativeTable>

    <footnotes>
        <footnote id="F1">On March 4, 2024, Great Elm Group, Inc. (&quot;GEG&quot;) agreed to transfer an aggregate of 1,239 shares of common stock of Great Elm Capital Corp. owned by GEG as compensation to certain of GEG's employees. The shares vest in equal annual installments on each 20th of September for the next four consecutive years, beginning on September 20, 2024, subject to continued service with GEG. GEG will retain voting rights over the unvested portion of the shares.</footnote>
    </footnotes>

    <ownerSignature>
        <signatureName>/s/ Adam M. Kleinman, attorney-in-fact</signatureName>
        <signatureDate>2024-03-04</signatureDate>
    </ownerSignature>
</ownershipDocument>
