TOKYO — Japanese officials said Thursday that they were trying every possible avenue to reach the Islamic State militants who have threatened to kill two Japanese hostages but had so far failed to make contact, with time running out on a deadline to pay for the men’s lives.

The Japanese government has confirmed that the two men seen in a video released Tuesday, kneeling in orange jumpsuits as a masked, knife-wielding militant stands between them, are Kenji Goto, a journalist, and Haruna Yukawa, who has called himself a military contractor. In the video, the militant threatened to kill the men unless the Islamic State received $200 million within 72 hours, a deadline that would arrive Friday if the countdown began when the video was made public.

The crisis has tested the resolve of Japan’s hard-charging prime minister, Shinzo Abe, who has vowed to give long-passive Japan a more active role in global affairs. When the video surfaced, Mr. Abe was in the Middle East, where he had pledged $200 million in nonlethal aid to countries battling the Islamic State, which controls territory in Iraq and Syria.

In the video, the militant demanded a ransom equivalent to the aid package, accusing Japan of offering the money “to kill our women and children, to destroy the homes of Muslims.” Mr. Abe, who called an emergency cabinet meeting on Wednesday night after rushing back to Tokyo, ordered his ministers to use whatever diplomatic channels they could to win the captives’ release.