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

    <schemaVersion>X0306</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2019-12-10</periodOfReport>

    <notSubjectToSection16>0</notSubjectToSection16>

    <issuer>
        <issuerCik>0001022646</issuerCik>
        <issuerName>ULTRA PETROLEUM CORP</issuerName>
        <issuerTradingSymbol>UPL</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001056491</rptOwnerCik>
            <rptOwnerName>FIR TREE CAPITAL MANAGEMENT LP</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>55 WEST 46TH STREET</rptOwnerStreet1>
            <rptOwnerStreet2>29TH FLOOR</rptOwnerStreet2>
            <rptOwnerCity>NEW YORK</rptOwnerCity>
            <rptOwnerState>NY</rptOwnerState>
            <rptOwnerZipCode>10036</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>0</isDirector>
            <isOfficer>0</isOfficer>
            <isTenPercentOwner>1</isTenPercentOwner>
            <isOther>0</isOther>
            <officerTitle></officerTitle>
            <otherText></otherText>
        </reportingOwnerRelationship>
    </reportingOwner>

    <nonDerivativeTable>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Shares</value>
            </securityTitle>
            <transactionDate>
                <value>2019-12-10</value>
            </transactionDate>
            <deemedExecutionDate></deemedExecutionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>9600000</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>0.15</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>26598611</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>I</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value>See footnote</value>
                    <footnoteId id="F1"/>
                </natureOfOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
    </nonDerivativeTable>

    <footnotes>
        <footnote id="F1">The securities to which this filing relates are held directly by certain private-pooled investment vehicles for which the Reporting Person serves as the investment manager (the &quot;Funds&quot;). The Reporting Person is the investment manager of the Funds, and has been granted investment discretion over portfolio investments, including the Common Shares held by the Funds. The Reporting Person disclaims beneficial ownership of the securities reported herein for purposes of Section 16 of the Securities and Exchange Act of 1934, as amended, except as to such extent of the Reporting Person's pecuniary interest in the securities.</footnote>
    </footnotes>

    <ownerSignature>
        <signatureName>/s/ Fir Tree Capital Management LP; By: Brian Meyer, its General Counsel</signatureName>
        <signatureDate>2019-12-12</signatureDate>
    </ownerSignature>
</ownershipDocument>
