Defense Secretary Jim Mattis said Tuesday that the U.S. will continue to confront China’s increasing militarization of islands in the South China Sea -- despite the U.S. angering Beijing over the weekend by sending two Navy ships to the region.

Mattis rebuked China and said the country hasn’t abided by its promise to stop militarization of the Spratly Islands, a disputed territory whose ownership is contested by Brunei, Malaysia, the Philippines, Taiwan and Vietnam.

Mattis said U.S. ships are maintaining a "steady drumbeat" of naval operations and will confront “what we believe is out of step with international law."

“You’ll notice there is only one country that seems to take active steps to rebuff them or state their resentment [to] them, but it’s international waters and a lot of nations want to see freedom of navigation,” Mattis told reporters while enroute to Hawaii.

His comments came after the two U.S. warships sailed close to the Paracel Islands, north of the Spratlys, promoting an angry response from China, which claims to have sent ships and aircraft to counter the U.S. Navy’s presence in the area.

The U.S. operation on Sunday was planned in advance, but similar military exercises have become routine amid China’s increasing militarization of the islands.

Officials at the Pentagon have long criticized China’s actions in the disputed islands, claiming the Chinese government has not been open about its military build-up and has been using the islands to gather intelligence, Reuters reported.

China reportedly deployed truck-mounted surface-to-air missiles or anti-ship cruise missiles at Woody Island, according to recent satellite photos. Earlier this month, China also landed bombers in the islands.

“When they (Chinese) do things that are opaque to the rest of us, then we cannot cooperate in areas that we would otherwise cooperate in,” Mattis told reporters, adding that American diplomats were working on the issue and heard concerns about Chinese actions not just from the U.S. government but other regional allies as well.

He is expected to raise the issue with Chinese officials during a security forum in Singapore later this week.

The Associated Press contributed to this report.