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

    <schemaVersion>X0508</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2025-03-13</periodOfReport>

    <issuer>
        <issuerCik>0001177648</issuerCik>
        <issuerName>ENANTA PHARMACEUTICALS INC</issuerName>
        <issuerTradingSymbol>ENTA</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001374636</rptOwnerCik>
            <rptOwnerName>Russell Lesley</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>C/O ENANTA PHARMACEUTICALS, INC.</rptOwnerStreet1>
            <rptOwnerStreet2>4 KINGSBURY AVENUE</rptOwnerStreet2>
            <rptOwnerCity>WATERTOWN</rptOwnerCity>
            <rptOwnerState>MA</rptOwnerState>
            <rptOwnerZipCode>02472</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>1</isDirector>
            <isOfficer>0</isOfficer>
            <isTenPercentOwner>0</isTenPercentOwner>
            <isOther>0</isOther>
        </reportingOwnerRelationship>
    </reportingOwner>

    <aff10b5One>0</aff10b5One>

    <derivativeTable>
        <derivativeTransaction>
            <securityTitle>
                <value>Stock Option (right to buy)</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <value>6.83</value>
            </conversionOrExercisePrice>
            <transactionDate>
                <value>2025-03-13</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>A</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>15700</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>0</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <exerciseDate>
                <footnoteId id="F1"/>
            </exerciseDate>
            <expirationDate>
                <value>2035-03-13</value>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Common Stock</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>15700</value>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>15700</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </derivativeTransaction>
    </derivativeTable>

    <footnotes>
        <footnote id="F1">Such option will become exercisable monthly in substantially equal installments over one year, beginning from the date of grant (March 13, 2025), with the final monthly installment vesting on the nearest trading day on the Nasdaq Global Select Market preceding the 2026 annual meeting of stockholders.</footnote>
    </footnotes>

    <remarks>Exhibit 24 Power of Attorney filed herewith.</remarks>

    <ownerSignature>
        <signatureName>/s/ Matthew Kowalsky as attorney-in-fact</signatureName>
        <signatureDate>2025-03-14</signatureDate>
    </ownerSignature>
</ownershipDocument>
