TOKYO — Japan will send defense forces early next year to patrol regional shipping lanes in the Middle East, from which it sources much of its crude oil, the government announced on Friday.

The rare overseas deployment, which will be limited to gathering intelligence, is meant to ensure the “security” of Japanese merchant ships and help maintain “peace and stability” in the region, the cabinet office said in a statement. The decision follows a series of attacks on oil tankers in the region, one of which was Japanese-operated.

The announcement also comes a week after a meeting in Tokyo between Prime Minister Shinzo Abe and President Hassan Rouhani of Iran, whose country the United States has blamed for attacks on tankers in the Gulf of Oman in June. The United States has called for an international coalition to protect ships in the region, but only a few of its allies have joined that mission.

The Japanese mission will be independent of any other nation’s deployments in the area, the cabinet office said Friday. But Chief Cabinet Secretary Yoshihide Suga, speaking at a regular news conference, said intelligence-gathering operations could be conducted in “coordination with relevant countries.”