The draw for the water polo competition at the Lima 2019 Pan American Games took place at the newly-built VMT Aquatics Centre in the Peruvian capital.
In attendance at the draw ceremony was Lima 2019 executive director Carlos Neuhaus, Peruvian Institute of Sport President Sebastián Suito and the executive director of the Swimming Union of the Americas, Gregory Eggert.
The captains of the Peruvian national teams carried out the draw.
In the men's competition, the hosts will meet Brazil in Group B on August 4, before playing Mexico and Argentina.
Canada, Cuba, defending champions the United States and Puerto Rico make up Group B.
Peru will face Mexico first in the women's competition, then completing their Group B fixtures against Canada and Cuba.
The US are also the defending champions team in the women's event and will hope to retain their title against Puerto Rico, Brazil and Venezuela in Group A.
The competition will last until August 10, consisting of a preliminary round, quarter-finals, semis and a final.
It will be held at VMT Aquatics Centre, which has a capacity of 1,500.
It is located in Villa Maria del Triunfo Sports Complex, also containing venues for the hockey, rugby and softball events among others.