General and administrative expense was $55.8 million, or $3.95 per Boe, during the second quarter 2018, an increase of 78% compared with the second quarter 2017. The increase in the second quarter 2018 was primarily due to an increase in restructuring costs associated with the implementation of our Strategic Initiatives. In addition to these restructuring costs, QEP recognized an increase in share-based compensation and changes in the mark-to-market value of the Deferred Compensation Wrap Plan and an increase related to reduced overhead recoveries, primarily associated with our Pinedale Divestiture.
During the second quarter 2018, production and property taxes were $37.6 million, an increase of 32% compared with the second quarter 2017. The increase in production and property taxes was primarily due to increased oil pricing and increased oil and condensate production in the Williston and Permian basins and increased gas production in Haynesville/Cotton Valley, partially offset by the loss of production resulting from the Pinedale Divestiture.
Production and property taxes were $2.66 per Boe, during the second quarter 2018, an increase of 29% compared with the second quarter 2017, but an increase of 63% excluding the Pinedale Divestiture. The 63% increase was due to an increase in average field-level equivalent prices in the Permian and Williston basins offset by lower rate per Boe in Haynesville/Cotton Valley due to lower non-operated ad valorem charges and franchise taxes per Boe.
Capital investment, excluding property acquisitions, was $365.7 million (on an accrual basis) for the second quarter 2018, compared with $306.0 million for the second quarter 2017. Approximately $337.8 million of the capital expenditures was related to the drilling, completion and equipping of wells and $27.9 million was related to infrastructure investment. The increase in capital expenditures was primarily related to increased drilling and completion activity in the Permian and Williston basins and Haynesville/Cotton Valley.
During the second quarter 2018, QEP acquired various oil and gas properties, which primarily included proved and unproved leasehold acreage in the Permian Basin, for an aggregate purchase price of $8.8 million.
2018 Share Repurchase Program
During the second quarter 2018, the Company settled and retired 592,310 shares that were repurchased in late March 2018 at a weighted average price of $9.37 per share, for $5.6 million.
On July 5, 2018, the Company's wholly owned subsidiary, QEP Energy Company, entered into a definitive agreement to sell natural gas and oil producing properties, undeveloped acreage and related assets located in the Uinta Basin for cash proceeds of $155.0 million, subject to customary purchase price adjustments. The agreement also includes the assumption of certain contractual obligations associated with gathering and processing contracts. The transaction is expected to close in September 2018.
QEP closed on the sale of several non-core assets during the second quarter 2018 for total proceeds of approximately $15.5 million.
During the second quarter 2018, the Company received bids for its Williston Basin assets. The Company believes that the initial bids received were below values reflective of the underlying quality and economics of the assets. The Company continues to engage in discussions with several potential buyers regarding the sale of all, or a portion of, the Williston Basin assets.
Additionally, in response to unsolicited inquiries, the Company has entered into confidentiality agreements and is providing data to several third parties interested in a transaction involving the Company's Haynesville assets.