Mexicans have vented their anger on social media over a photo which shows a tourist posing with the rifle of a federal police officer.
The smiling, shirtless tourist is flanked by two federal officers in the Mexican resort of Playa del Carmen, in southern Quintana Roo state.
Local media have pointed out that the rifle does not have a magazine.
Nevertheless, it is strictly prohibited for police officers to lend their firearms.
Eighty federal police officers were recently deployed to the resort to combat crime.
In January, five people were killed in Playa del Carmen when a man opened fire at the Blue Parrot nightclub during a popular electronic music festival.
Local daily Capital Quintana Roo complained [in Spanish] that while officers "were out enjoying themselves", the levels of violence kept rising.
It was a sentiment echoed on Twitter by many.
Lalo Hernandez (@lalhdeza) tweeted the photo and referring to another picture showing a police patrol allowing a group of female tourists to pose on top of their truck. He wrote: "This is how the federal [police] party on the beach: they lend their weapons to tourists and give lifts to young women."
Journalist Fernanda Familiar called the incident "inexplicable" in a place where there is "plenty of violence".
Visit Riviera Maya (@Turismo Riviera) complained that the officers behaved "as if it was all a game".
Quintana Roo, an area popular with foreign tourists, had long been spared from the drug-related violence that afflicts other parts of Mexico.
But it has recently seen a rise in incidents such as the shooting at the Blue Parrot and another gunfight in Cancun, an hour's drive to the north of Playa del Carmen.