Secretary of State Hillary Rodham Clinton and Mexico's foreign minister signed the deal at a ceremony in the Mexican resort of Los Cabos as Mexican President Felipe Calderon and U.S. Interior Secretary Ken Salazar looked on.
The cooperation stems from an understanding that President Barack Obama and Calderon reached in 2010 to share in the profits and work together to avoid spills.
Clinton said the deal would "ensure safe, efficient, responsible exploration of the oil and gas reservoirs in the Gulf of Mexico."
"These reservoirs could hold considerable reserves that would benefit the United States and Mexico alike," she said.
But they don't necessarily stop neatly at our maritime boundary," Clinton added. "This could lead to disputes if a company discovers a reservoir that straddles the boundary -- disputes, for example, over who should do the extraction and how much they should extract."
Clinton said the agreement will prevent such disputes and create new business opportunities.
Calderon said the deal creates clear rules and should erase any fear among Mexicans that their oil will be appropriated by Americans.
And he stressed that "operations will be done in a safe and responsible manner, with full respect to the environment."
Under the agreement, U.S. companies will now be allowed to partner with Mexico's national oil company in drilling. But neither country is constrained by the other.
If the two governments can't agree on how to exploit a reservoir, either can take its share unilaterally.
The U.S. Interior Department said the agreement makes nearly 1.5 million acres of the U.S. Outer Continental Shelf more accessible for exploration and production activities.
The area could contain 172 million barrels of oil and 304 billion cubic feet of natural gas, it said.
"This is an area larger than the state of Delaware," Salazar said.