A former environmental activist who cracked down on the Philippine mining industry as the country’s acting environment secretary was forced from her job on Wednesday when Congress denied her confirmation to the post.

Since being appointed in June by President Rodrigo Duterte, the acting secretary, Gina Lopez, has taken aim at the mining industry. She has acted aggressively to close mining companies accused of violating environmental laws and canceled mining contracts in watershed areas. Last Thursday, Ms. Lopez raced to issue a ban on open-pit mining along with other restrictions.

“We planned many things,” Ms. Lopez said during a news conference after the vote against her confirmation. “What a waste. Everyone would have benefited from the management and care of the environment.”

Ms. Lopez was championed by environmental activists, religious groups and social justice organizations, some of whom rallied in her support outside the Senate building on Wednesday. During her tenure, Ms. Lopez moved to shut the operations of 28 of the country’s 41 mining companies. Those companies account for about half of the nickel production in the Philippines and have been accused of leaving rivers, rice fields and watersheds stained red with nickel laterite.