A Chinese government vessel armed with a cannon-like weapon entered Japanese territorial waters near the China-claimed Senkaku Islands on Tuesday for the first time since Beijing passed a new law that allows its coast guard to fire on foreign ships in waters it claims.

Two China Coast Guard vessels entered the waters near the uninhabited islands at around 4:15 a.m., the Japan Coast Guard said, joining two others that had been there since Monday. The two new vessels — including the ship armed with the cannon-like weapon — later approached a Japanese fishing boat that was being guarded by Japan Coast Guard patrol vessels.

The Japan Coast Guard repeatedly urged the Chinese ships to leave the area, and the two vessels that entered Tuesday morning later exited Japanese territorial waters at around 10:02 a.m., according to the Japanese government. As of 12:30 p.m., all four Chinese vessels had moved to the so-called contiguous zone just outside Japanese territorial waters near the Senkakus.