TOKYO — The United States and Japan agreed on Thursday to broaden their security alliance, expanding Japan’s role while trying to show American determination to remain a dominant presence in the region.

The agreement, which will position surveillance drones in Japan for the first time, underscored the two countries’ efforts to respond to growing challenges from China and North Korea at a time of budget constraints. It also included some of the clearest signals yet that the United States backs Japan’s increasing though still limited moves to strengthen its military, and its military ties in Asia, as a counterbalance to China’s own buildup.

Those provisions are sure to rankle China and come at a time of already heightened tensions between the two Asian powers, which are locked in a standoff over islands in the East China Sea. The drones, as well as Navy reconnaissance planes never before stationed outside the United States, are expected to patrol waters in the region, including those around the disputed island chain.

The agreement was signed during a visit here by the secretaries of state and defense, John Kerry and Chuck Hagel, who were meeting with their Japanese counterparts. With two cabinet members present, the signing appeared to be another effort by the administration to fight a growing anxiety in Asia that the United States is too preoccupied with internal political struggles and troubles in the Middle East to carry through with its much-vaunted “pivot” to Asia.