SEOUL, South Korea — A 24-year-old U.S. tourist who said he was seeking shelter in North Korea has been detained there for more than two weeks and is being held on charges of a “gross violation of its legal order,” the country’s official Korean Central News Agency reported Friday.

The circumstances of the detention may be in dispute. A travel agency in New Jersey says the man, whom it identified as Matthew Miller, was on its tour to the North and that he was being held “on claims of seeking asylum.”

The North Korean announcement was made late Friday, while President Obama was in South Korea on a state visit.

The news agency said the American was being held for his “rash behavior” while passing through customs after arriving in North Korea on April 10. According to the report, the American tore his tourist visa, shouting he had entered the North “after choosing it as a shelter.” The agency’s report identified the man as Miller Matthew Todd, possibly rendering his name in Korean fashion with the surname first.

A statement on the website of the tour agency, Uri Tours, said the agency was “working closely and continuously with all relevant government and diplomatic entities to resolve this matter in a speedy and favorable manner.” It added: “In order to maintain the confidentiality of Mr. Miller and his family, we are not speaking with the press.”

Uri Tours is one of several travel agencies catering to a growing interest in tourism to the police state. If confirmed by U.S. authorities, the detention of another U.S. tourist could further complicate efforts to handle North Korea’s nuclear ambitions.

Another American who entered the North on a tourist visa, Merrill Newman of Palo Alto, Calif., was released last year after more than a month of captivity. North Korea cited his age, 85 at the time, as a reason for freeing him. The North had accused him of war crimes after learning that Newman, a Korean War veteran, had helped train anti-Communist guerrillas during the war.

Jen Psaki, a State Department spokeswoman, said the United States was aware of the reports about Miller and had been in touch with Sweden, which acts on behalf of U.S. interests in North Korea.

North Korea is still holding Kenneth Bae, a Korean-American missionary, formerly from Lynnwood, who was arrested in November 2012 and sentenced to 15 years of hard labor on accusations of trying to use religion to undermine the North Korean government.