A police officer was shot and a second one slashed in Brooklyn on Wednesday, hours after a curfew that was intended to quell unrest over the death of George Floyd in Minnesota, police said.

Both officers were taken to a hospital with wounds that were not expected to be life-threatening, the police department said.

The shooting happened just before midnight on a commercial block in central Brooklyn. A third officer suffered a hand injury. Details on what led to the shooting weren’t immediately available.

New York City police officers gather early Thursday, June 4, 2020, near the site of shooting Wednesday night in the Brooklyn borough of New York. The police department says an officer has been shot in Brooklyn. The shooting happened late Wednesday, nearly four hours after an 8 p.m. curfew went into effect intended to quell unrest over the death of George Floyd in Minnesota. Details on the shooting, including the officer's condition, weren’t immediately available. (AP PhotoFrank Franklin II)

New York City police officers gather early Thursday, June 4, 2020, near the site of shooting Wednesday night in the Brooklyn borough of New York. The police department says an officer has been shot in Brooklyn. The shooting happened late Wednesday, nearly four hours after an 8 p.m. curfew went into effect intended to quell unrest over the death of George Floyd in Minnesota. Details on the shooting, including the officer's condition, weren’t immediately available. (AP PhotoFrank Franklin II)

Mayor Bill de Blasio was on his way to the hospital to check on the officers, according to a spokesperson.

The area was filled police personnel and vehicles in the hour after the shooting.

New York City has been roiled by days of protests over police brutality, but it was unclear whether the incident was related to the demonstrations.

New York City police stand on a street early Thursday, June 4, 2020, in the Brooklyn borough of New York, after a police officer was shot. The police department says an officer has been shot in Brooklyn. The shooting happened late Wednesday, nearly four hours after an 8 p.m. curfew went into effect intended to quell unrest over the death of George Floyd in Minnesota. Details on the shooting, including the officer's condition, weren’t immediately available. (AP PhotoFrank Franklin II)

New York City police stand on a street early Thursday, June 4, 2020, in the Brooklyn borough of New York, after a police officer was shot. The police department says an officer has been shot in Brooklyn. The shooting happened late Wednesday, nearly four hours after an 8 p.m. curfew went into effect intended to quell unrest over the death of George Floyd in Minnesota. Details on the shooting, including the officer's condition, weren’t immediately available. (AP PhotoFrank Franklin II)

Several large marches in other parts of Brooklyn had continued after the curfew that authorities imposed to stop stores from being damaged and ransacked.