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

    <schemaVersion>X0306</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2020-05-15</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>

    <derivativeTable>
        <derivativeTransaction>
            <securityTitle>
                <value>Cash Settled Equity Swap</value>
                <footnoteId id="F2"/>
                <footnoteId id="F3"/>
            </securityTitle>
            <conversionOrExercisePrice>
                <value>6.165</value>
            </conversionOrExercisePrice>
            <transactionDate>
                <value>2020-05-15</value>
            </transactionDate>
            <deemedExecutionDate></deemedExecutionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>J</transactionCode>
                <equitySwapInvolved>1</equitySwapInvolved>
                <footnoteId id="F2"/>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>1</value>
                    <footnoteId id="F2"/>
                </transactionShares>
                <transactionPricePerShare>
                    <footnoteId id="F2"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <exerciseDate>
                <footnoteId id="F2"/>
            </exerciseDate>
            <expirationDate>
                <value>2021-02-01</value>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Common Shares</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>2894144</value>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>1</value>
                    <footnoteId id="F2"/>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>I</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value>See footnote</value>
                    <footnoteId id="F1"/>
                </natureOfOwnership>
            </ownershipNature>
        </derivativeTransaction>
    </derivativeTable>

    <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>
        <footnote id="F2">Settlement of cash settled equity swaps. The cash settled equity swaps were settled pursuant to their terms. The swaps were exercisable at any time. The notional shares settled under the swap contract were settled at a settlement price of $0.0123.</footnote>
        <footnote id="F3">Cash-settled equity swap. Swaps are not counted for purposes of determining 10% beneficial ownership. These contracts do not give the Reporting Person direct or indirect voting, investment or dispositive control over any securities of the Issuer and do not require the counterparties thereto to acquire, hold, vote or dispose of any securities of the Issuer. Accordingly, the Reporting Person disclaims any beneficial ownership in securities that may be referenced in such contracts or that may be held from time to time by any counterparties to the contracts.</footnote>
    </footnotes>

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