MEXICO CITY — As the price of oil was plummeting in July, the Mexican government auctioned off leases to explore blocks in the Gulf of Mexico. With energy companies retrenching, the auction was a failure.

But Mexico’s fortunes changed on Wednesday. In a follow-up auction, the Mexican government put five production blocks up for bid and awarded contracts for three, well above the average for similar auctions in Latin America.

The success of Wednesday’s bidding appeared to put the government’s new oil policy back on track. Mexico has ended more than 75 years of a state monopoly to invite in foreign investment in an attempt to end a decade-long decline in oil production.

Investors were attracted by relaxed rules and by the characteristics of the blocks, which hold probable oil and gas reserves, analysts said.