BEIJING — A United States Navy warship sailed within 12 nautical miles of an artificial island claimed by China in the South China Sea on Wednesday, an operation that showed a new firmness by the Trump administration in its dealings with Beijing.

The warship, the guided missile destroyer Dewey, passed near Mischief Reef in the Spratly Islands, not far from the Philippines, American military officials said.

The operation may tamp down concerns among allies of the United States that the Trump administration has been unwilling to confront China’s territorial claims in the South China Sea as it seeks Beijing’s cooperation on issues like halting North Korea’s nuclear program.

Until the operation on Wednesday, the Pentagon had turned down requests from the United States Pacific Command in Hawaii, under the command of Adm. Harry B. Harris Jr., for such maneuvers. It was the first freedom of navigation operation since President Trump took office.