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

    <schemaVersion>X0508</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2024-09-20</periodOfReport>

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

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001715823</rptOwnerCik>
            <rptOwnerName>Kleinman Adam M</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>C/O GREAT ELM CAPITAL CORP.</rptOwnerStreet1>
            <rptOwnerStreet2>3801 PGA BOULEVARD, SUITE 603</rptOwnerStreet2>
            <rptOwnerCity>PALM BEACH GARDENS</rptOwnerCity>
            <rptOwnerState>FL</rptOwnerState>
            <rptOwnerZipCode>33410</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isOfficer>true</isOfficer>
            <officerTitle>CCO and Secretary</officerTitle>
        </reportingOwnerRelationship>
    </reportingOwner>

    <aff10b5One>false</aff10b5One>

    <nonDerivativeTable>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <transactionDate>
                <value>2024-09-20</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>J</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
                <footnoteId id="F1"/>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>6194</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>0</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>28326</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <transactionDate>
                <value>2024-09-24</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>J</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
                <footnoteId id="F2"/>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>2093</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>0</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>30419</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                    <footnoteId id="F3"/>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
    </nonDerivativeTable>

    <footnotes>
        <footnote id="F1">Mr. Kleinman is the Chief Compliance Officer and Secretary of Great Elm Capital Corp. (&quot;GECC&quot;). Mr. Kleinman received an award of 6,194 shares of common stock of GECC as equity compensation for his position at GECC, 1,548 of which vested on the grant date, September 20, 2024, and the remainder of which will vest in equal annual installments on each anniversary of the grant date until September 20, 2027, subject to continued service with GECM.</footnote>
        <footnote id="F2">Represents shares of common stock of GECC acquired as a result of a stock dividend associated with the portion of the equity compensation awarded to Mr. Kleinman in previous years that vested on the anniversary of those grant dates.</footnote>
        <footnote id="F3">Includes 1,574 shares of common stock of GECC acquired as a result of stock dividends associated with portions of equity compensation awarded to Mr. Kleinman in previous years that vested on the anniversary of those grant dates.</footnote>
    </footnotes>

    <ownerSignature>
        <signatureName>/s/ Adam M. Kleinman</signatureName>
        <signatureDate>2024-09-24</signatureDate>
    </ownerSignature>
</ownershipDocument>
