<?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>0001770670</rptOwnerCik>
            <rptOwnerName>Davis Keri</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>CFO</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>3717</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>0</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>18532</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>781</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>0</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>19313</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
    </nonDerivativeTable>

    <footnotes>
        <footnote id="F1">Ms. Davis is the CFO of Great Elm Capital Management, Inc. (&quot;GECM&quot;), the external investment manager of Great Elm Capital Corp. (&quot;GECC&quot;). Ms. Davis received an award of 3,717 shares of common stock of GECC as equity compensation for her position at GECM, 929 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 Ms. Davis in previous years that vested on the anniversary of those grant dates.</footnote>
    </footnotes>

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