<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="../4_X02.xsl"?><ownershipDocument>    <schemaVersion>X0202</schemaVersion>    <documentType>4</documentType>    <periodOfReport>2007-10-11</periodOfReport>    <notSubjectToSection16>0</notSubjectToSection16>    <issuer>        <issuerCik>0001070412</issuerCik>        <issuerName>CONSOL ENERGY INC</issuerName>        <issuerTradingSymbol>CNX</issuerTradingSymbol>    </issuer>    <reportingOwner>        <reportingOwnerId>            <rptOwnerCik>0001322947</rptOwnerCik>            <rptOwnerName>Richey P Jerome</rptOwnerName>        </reportingOwnerId>        <reportingOwnerAddress>            <rptOwnerStreet1>1800 WASHINGTON ROAD</rptOwnerStreet1>            <rptOwnerStreet2></rptOwnerStreet2>            <rptOwnerCity>PITTSBURGH</rptOwnerCity>            <rptOwnerState>PA</rptOwnerState>            <rptOwnerZipCode>15241</rptOwnerZipCode>            <rptOwnerStateDescription></rptOwnerStateDescription>        </reportingOwnerAddress>        <reportingOwnerRelationship>            <isDirector>0</isDirector>            <isOfficer>1</isOfficer>            <isTenPercentOwner>0</isTenPercentOwner>            <isOther>0</isOther>            <officerTitle>Sr. V.P. &amp; General Counsel</officerTitle>        </reportingOwnerRelationship>    </reportingOwner>    <nonDerivativeTable>        <nonDerivativeTransaction>            <securityTitle>                <value>Common Shares, $0.01 par value per share</value>            </securityTitle>            <transactionDate>                <value>2007-10-11</value>            </transactionDate>            <transactionCoding>                <transactionFormType>4</transactionFormType>                <transactionCode>M</transactionCode>                <equitySwapInvolved>0</equitySwapInvolved>                <footnoteId id="F1"/>            </transactionCoding>            <transactionAmounts>                <transactionShares>                    <value>8886</value>                </transactionShares>                <transactionPricePerShare>                    <value>22.75</value>                </transactionPricePerShare>                <transactionAcquiredDisposedCode>                    <value>A</value>                </transactionAcquiredDisposedCode>            </transactionAmounts>            <postTransactionAmounts>                <sharesOwnedFollowingTransaction>                    <value>23445</value>                </sharesOwnedFollowingTransaction>            </postTransactionAmounts>            <ownershipNature>                <directOrIndirectOwnership>                    <value>D</value>                </directOrIndirectOwnership>            </ownershipNature>        </nonDerivativeTransaction>        <nonDerivativeTransaction>            <securityTitle>                <value>Common Shares, $0.01 par value per share</value>            </securityTitle>            <transactionDate>                <value>2007-10-11</value>            </transactionDate>            <transactionCoding>                <transactionFormType>4</transactionFormType>                <transactionCode>S</transactionCode>                <equitySwapInvolved>0</equitySwapInvolved>                <footnoteId id="F1"/>            </transactionCoding>            <transactionAmounts>                <transactionShares>                    <value>8886</value>                </transactionShares>                <transactionPricePerShare>                    <value>50.43</value>                </transactionPricePerShare>                <transactionAcquiredDisposedCode>                    <value>D</value>                </transactionAcquiredDisposedCode>            </transactionAmounts>            <postTransactionAmounts>                <sharesOwnedFollowingTransaction>                    <value>14559</value>                    <footnoteId id="F2"/>                </sharesOwnedFollowingTransaction>            </postTransactionAmounts>            <ownershipNature>                <directOrIndirectOwnership>                    <value>D</value>                </directOrIndirectOwnership>            </ownershipNature>        </nonDerivativeTransaction>    </nonDerivativeTable>    <derivativeTable>        <derivativeTransaction>            <securityTitle>                <value>Stock Option (right to buy)</value>            </securityTitle>            <conversionOrExercisePrice>                <value>22.75</value>            </conversionOrExercisePrice>            <transactionDate>                <value>2007-10-11</value>            </transactionDate>            <transactionCoding>                <transactionFormType>4</transactionFormType>                <transactionCode>M</transactionCode>                <equitySwapInvolved>0</equitySwapInvolved>                <footnoteId id="F1"/>            </transactionCoding>            <transactionAmounts>                <transactionShares>                    <value>8886</value>                </transactionShares>                <transactionPricePerShare>                    <value>0</value>                </transactionPricePerShare>                <transactionAcquiredDisposedCode>                    <value>D</value>                </transactionAcquiredDisposedCode>            </transactionAmounts>            <exerciseDate>                <footnoteId id="F3"/>            </exerciseDate>            <expirationDate>                <value>2015-05-03</value>            </expirationDate>            <underlyingSecurity>                <underlyingSecurityTitle>                    <value>Common Shares, $0.01 par value per share</value>                </underlyingSecurityTitle>                <underlyingSecurityShares>                    <value>8886</value>                </underlyingSecurityShares>            </underlyingSecurity>            <postTransactionAmounts>                <sharesOwnedFollowingTransaction>                    <value>8888</value>                </sharesOwnedFollowingTransaction>            </postTransactionAmounts>            <ownershipNature>                <directOrIndirectOwnership>                    <value>D</value>                </directOrIndirectOwnership>            </ownershipNature>        </derivativeTransaction>    </derivativeTable>    <footnotes>        <footnote id="F1">Transaction effected pursuant to Rule 10b5-1 trading plan adopted by the reporting person on August 14, 2007.</footnote>        <footnote id="F2">Of the 14,559 shares owned directly, 10,155 are restricted stock units including dividend equivalent rights.</footnote>        <footnote id="F3">Stock option grant provides that options will vest 25% per year beginning on May 3, 2006.</footnote>    </footnotes>    <ownerSignature>        <signatureName>/s/ P. Jerome Richey by Stephanie Gill, his attorney-in-fact</signatureName>        <signatureDate>2007-10-15</signatureDate>    </ownerSignature></ownershipDocument>
