SAN SALVADOR, El Salvador — A street gang in El Salvador put a fake body in an abandoned car to lure police into a car-bomb attack, wounding two officers Monday, in the latest in a round of killings of police and soldiers in the country.

The authorities said suspected gang members wrapped a mannequin in blankets inside a car and then detonated explosives in the vehicle when police arrived to investigate what they thought was a body at a soccer field on the outskirts of San Salvador, the capital.

The attack came after suspected gang members killed two police officers and three soldiers over the weekend. All were off-duty when they were attacked. Some were playing sports.

Howard Cotto, the national police director, said the attacks were planned and carried out by the Mara Salvatrucha gang, known as MS-13.