Apache Corp., an oil and gas exploration and production firm under Houston-based APA Corp., agreed to pay $4 million in civil penalties split evenly between the State of New Mexico and the United States after settling a civil suit filed jointly by the U.S., on behalf of the Environmental Protection Agency, and the New Mexico Environment Department.