TOKYO — Just days after a flotilla of American and Japanese warships left the sea between Japan and Korea, where they had been deployed in a show of force toward Pyongyang, North Korea tested missiles designed to hit such ships.

The launches Thursday morning of what appeared to be surface-to-ship cruise missiles were meant to demonstrate that the North could repel forces staging a strike on the Korean Peninsula, analysts said.

South Korea’s newly elected president, Moon Jae-in, convened his first national security meeting in Seoul on Thursday to discuss the latest missile tests, which were the fifth the North had conducted since he was elected last month, and the 10th this year.

“North Korea will only face further isolation from the international community and economic difficulties with its missile launches,” Mr. Moon said at the meeting, according to a statement released by the presidential Blue House.