U.S. Rep. Louie Gohmert is raising issues with the recent detention of 10 U.S. Navy soldiers in Iran after the Obama administration called on the country’s leaders to take in two boats lost along the coast.

“I understand that John Kerry has indicated that, look, when he got word, he and (Defense Secretary) Ash Carter called the Iranians to help take care of our Navy guys because they had some mechanical problems,” Gohmert told The Blaze’s Dana Loesch.

“When our Navy ships have problems, we don’t call Iran, we call the rest of the Navy,” he continued. “We can call the Air Force, the Army, the Marines, the Coast Guard. We don’t call Iran.”

“But I guess if you have weddings that involve the people who are in charge in Iran, then maybe you feel that comfortable, but you know Dana, there are secrets on every military ship we have, every military boat, military fast boat, whether it’s inflatable or not, which has no business being in the hands of the Iranians,” Gohmert said.

“So for the Iranians to even issue a statement at all saying we are going to release them soon tells you they control whether or not they can leave,” he said. “That situation should not be allowed to happen.”

Iran released the 10 U.S. sailors Wednesday after detaining them for a day while the country’s officials investigated their intentions. When Iran officials determined the nine men and one woman aboard the two boats experienced “mechanical problems due to their navigation systems,” Iran officials approved their release, Iran Revolutionary Guard Gen. Ali Fadavi said on Iran state TV, according to The Blaze.

“It became clear that the U.S. combat vessels’ illegal entry into the Islamic Republic of Iran’s waters was the result of an unpurposeful action and a mistake,” according to a government statement cited by NPR.

Early on in the ordeal, Iranian officials alleged the soldiers engaged in “unprofessional acts” for about 40 minutes before they were picked up by Iranian forces, and balked at the suggestion that the group – on its way from Kuwait to Bahrain – accidentally drifted into Iranian waters.

“Certainly US presence in Persian Gulf and their passage has never been innocent and we do not deem their passage as innocent,” Fadavi said.

“If it is determined, after the investigation is carried out, that their action was not intentional, another approach will be taken,” Revolutionary Guard spokesman Gen Ramezan Sharif said. “But If it’s determined, after they are debriefed and interviewed, that their entry (into Iran’s territorial waters) was for intelligence gathering or irrelevant action, definitely the authorities will take the necessary measures.”

The Pentagon released a statement about the soldiers’ release Wednesday.

“Ten U.S. Navy Sailors safely returned to U.S. custody today, after departing Iran. There are no indications that the Sailors were harmed during their brief detention,” it read. “The Sailors departed Farsi Island at 8:43 a.m. (GMT), aboard the two Riverine Command Boats (RCB) that they had been operating when they lost contact with the U.S. Navy.”

“The Sailors were later transferred ashore by U.S. Navy aircraft, while other Sailors took charge of the RCBs and continued transiting toward Bahrain, the boats’ original destination.”

Carter also issued a personal thank you to Kerry for calling on the Iranians for help.

“I am pleased that ten U.S. Navy sailors have departed Iran and are now back in U.S. hands. I want to personally thank Secretary of State John Kerry for his diplomatic engagement with Iran to secure our sailors’ swift return. Around the world, the U.S. Navy routinely provides assistance to foreign sailors in distress, and we appreciate the timely way in which this situation was resolved,” the statement read.