<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="../4_X02.xsl"?><ownershipDocument>    <schemaVersion>X0202</schemaVersion>    <documentType>4</documentType>    <periodOfReport>2006-08-01</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>Vice Pres. &amp; General Counsel</officerTitle>        </reportingOwnerRelationship>    </reportingOwner>    <nonDerivativeTable>        <nonDerivativeTransaction>            <securityTitle>                <value>Common shares, $0.01 par value per share</value>            </securityTitle>            <transactionDate>                <value>2006-08-01</value>            </transactionDate>            <transactionCoding>                <transactionFormType>4</transactionFormType>                <transactionCode>S</transactionCode>                <equitySwapInvolved>0</equitySwapInvolved>                <footnoteId id="F1"/>            </transactionCoding>            <transactionAmounts>                <transactionShares>                    <value>467</value>                </transactionShares>                <transactionPricePerShare>                    <value>41.50</value>                </transactionPricePerShare>                <transactionAcquiredDisposedCode>                    <value>D</value>                </transactionAcquiredDisposedCode>            </transactionAmounts>            <postTransactionAmounts>                <sharesOwnedFollowingTransaction>                    <value>11763</value>                    <footnoteId id="F2"/>                </sharesOwnedFollowingTransaction>            </postTransactionAmounts>            <ownershipNature>                <directOrIndirectOwnership>                    <value>D</value>                </directOrIndirectOwnership>            </ownershipNature>        </nonDerivativeTransaction>    </nonDerivativeTable>    <footnotes>        <footnote id="F1">Transaction effected pursuant to Rule 10b5-1 trading plan adopted by the reporting person on August 16, 2005.</footnote>        <footnote id="F2">Of the 11,763 shares owned directly, 8,564 are restricted stock units including dividend equivalent rights.</footnote>    </footnotes>    <ownerSignature>        <signatureName>/s/ P. Jerome Richey by Stephanie Gill, his attorney-in-fact</signatureName>        <signatureDate>2006-08-03</signatureDate>    </ownerSignature></ownershipDocument>
