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

    <schemaVersion>X0508</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2025-09-05</periodOfReport>

    <issuer>
        <issuerCik>0001465128</issuerCik>
        <issuerName>STARWOOD PROPERTY TRUST, INC.</issuerName>
        <issuerTradingSymbol>STWD</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001469667</rptOwnerCik>
            <rptOwnerName>Dishner Jeffrey G.</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>C/O STARWOOD PROPERTY TRUST, INC.</rptOwnerStreet1>
            <rptOwnerStreet2>2340 COLLINS AVENUE</rptOwnerStreet2>
            <rptOwnerCity>MIAMI BEACH</rptOwnerCity>
            <rptOwnerState>FL</rptOwnerState>
            <rptOwnerZipCode>33139</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>true</isDirector>
        </reportingOwnerRelationship>
    </reportingOwner>

    <aff10b5One>false</aff10b5One>

    <nonDerivativeTable>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <transactionDate>
                <value>2025-09-05</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>A</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>230</value>
                    <footnoteId id="F1"/>
                </transactionShares>
                <transactionPricePerShare>
                    <footnoteId id="F1"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>175165</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
        <nonDerivativeHolding>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>609132</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>I</value>
                    <footnoteId id="F2"/>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value>By Jeffrey Dishner Revocable Trust</value>
                    <footnoteId id="F2"/>
                </natureOfOwnership>
            </ownershipNature>
        </nonDerivativeHolding>
    </nonDerivativeTable>

    <footnotes>
        <footnote id="F1">230 shares of the issuer's common stock were granted to Mr. Dishner through SPT Management, LLC, the issuer's external manager. This transaction is being reported late due to an inadvertent administrative error.</footnote>
        <footnote id="F2">Mr. Dishner disclaims beneficial ownership of these shares of the issuer's common stock except to the extent of his pecuniary interest therein, and the inclusion of these shares of the issuer's common stock in this report shall not be deemed an admission of beneficial ownership of all of the reported shares of the issuer's common stock for purposes of Section 16 or for any other purpose.</footnote>
    </footnotes>

    <ownerSignature>
        <signatureName>/s/ Jeffrey G. Dishner</signatureName>
        <signatureDate>2025-09-12</signatureDate>
    </ownerSignature>
</ownershipDocument>
