TOKYO (AP) _ Police arrested two rightists Wednesday for hurling smoke bombs into the Russian Embassy compound in an apparent protest of President Boris Yeltsin's planned visit next week.

Takumi Nagahashi, 24, and Junichi Kuroda, 21, confessed to the attack Tuesday night but refused to explain their action, police said. The bombs scorched grass in the compound, but there were no reports of injuries or major damage.

Despite the turmoil in Moscow, Yeltsin is scheduled to visit Japan on Tuesday and Wednesday. Russia and Japan are trying to resolve a dispute over several northern islands seized by Soviet troops in the closing days of World War II.

In a separate incident Tuesday, police arrested Shigenori Okimoto, 20, as he tried to enter the Japanese Foreign Ministry building armed with an 18-inch sword. Police said Okimoto, a member of another rightist group, carried a written appeal declaring: ''Down with Yeltsin's visit.''