SALT LAKE CITY >> A man from North Korea accused of trying to buy military-grade night vision goggles from a Utah-based undercover agent and illegally export them to China has pleaded guilty to a federal charge in an agreement with prosecutors.

Song Il Kim was arrested in Hawaii after agreeing to pay $22,000 for the equipment and packing it into boxes that he claimed were filled with used toys and towels so he could ship them to his Chinese business, charges state.

Prosecutors say they believe the six pairs of goggles would have gotten to North Korea from there, though defense attorney Scott Williams disputes that allegation.

During a Wednesday hearing in Salt Lake City, Kim, 42, pleaded guilty to violating the Arms Export Control Act by exporting the equipment without a license, court records show. That law regulates shipping of military equipment, guns, explosives and other devices.

Under the terms of the plea deal, Kim is facing 40 months in prison at a sentencing hearing set for February.

He was arrested in Hawaii after a months-long investigation by a team of Homeland Security agents in Utah that started after an agent responded to an ad on a business-to-business website. It culminated in July with an in-person meeting with an undercover agent in a Waikiki hotel where Kim provided a $16,000 cash down payment, authorities said.

The agent and Kim packed three of the devices in a box and Kim filled out a customs form stating the box contained used toys and towels, according to court documents.

They took the box to a post office, where Kim paid the postage and handed the box to a mail clerk, the charges state. The package was intercepted by agents before it was shipped out, according to the U.S. Attorney’s Office for Utah.

Kim wanted to buy two types of goggles, one designed to be mounted to a helmet or gun and used with one eye, and the other meant to be worn over both eyes, charges state. Both are designed for the U.S. military, and it is illegal to export them without State Department authorization, prosecutors said. He was also interested in buying and exporting a thermal imaging weapon sight, according to court paperwork.

It is federal policy to deny licenses and other approvals to export the items to certain countries: Belarus, Cuba, Iran, North Korea, Syria and Venezuela. The policy also applies to countries the United States maintains an arms embargo with, including Burma, China, Liberia and Sudan.

Kim, who is also known as Kim Song Il, was born in North Korea, holds a Cambodian passport and lives in China, court records show.