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

    <schemaVersion>X0508</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2025-11-20</periodOfReport>

    <issuer>
        <issuerCik>0001143513</issuerCik>
        <issuerName>GLADSTONE CAPITAL CORP</issuerName>
        <issuerTradingSymbol>GLAD</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001669323</rptOwnerCik>
            <rptOwnerName>Schaltenbrand Nicole Frances Dubas</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>1521 WESTBRANCH DRIVE</rptOwnerStreet1>
            <rptOwnerStreet2>SUITE 100</rptOwnerStreet2>
            <rptOwnerCity>MCLEAN</rptOwnerCity>
            <rptOwnerState>VA</rptOwnerState>
            <rptOwnerZipCode>22102</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>0</isDirector>
            <isOfficer>1</isOfficer>
            <isTenPercentOwner>0</isTenPercentOwner>
            <isOther>0</isOther>
            <officerTitle>CFO and Treasurer</officerTitle>
        </reportingOwnerRelationship>
    </reportingOwner>

    <aff10b5One>0</aff10b5One>

    <nonDerivativeTable>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <transactionDate>
                <value>2025-11-20</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>P</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>496</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>20.159</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>3095</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
        <nonDerivativeHolding>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>618</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>I</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value>by Spouse</value>
                    <footnoteId id="F1"/>
                </natureOfOwnership>
            </ownershipNature>
        </nonDerivativeHolding>
    </nonDerivativeTable>

    <footnotes>
        <footnote id="F1">Ms. Schaltenbrand disclaims beneficial ownership of these 891 shares held by her spouse and this report shall not be deemed an admission that Ms. Schaltenbrand is the beneficial owner of the securities for purposes of Section 16 or any other purpose.</footnote>
    </footnotes>

    <ownerSignature>
        <signatureName>/s/ Michael LiCalsi, attorney-in-fact</signatureName>
        <signatureDate>2025-11-21</signatureDate>
    </ownerSignature>
</ownershipDocument>
