JAKARTA (Reuters) - Indonesia intends to send a diplomatic note to the U.S. secretary of state and summon Washington’s deputy ambassador in Jakarta to explain why the head of its military was denied entry to the United States, Indonesian officials said on Sunday.

FILE PHOTO: Indonesia's Armed Forces Commander General Gatot Nurmantyo gestures as he sits inside his vehicle after talking to reporters in Jakarta, Indonesia, January 5, 2017. REUTERS/Beawiharta/File Photo

Armed Forces Commander General Gatot Nurmantyo was about to board a flight on Saturday when the airline informed him that the U.S. Customs and Border Protection had denied him entry, military spokesman Wuryanto told a news conference in Jakarta.

Nurmantyo was going to the United States at the invitation of General Joseph F. Dunford Jr., chairman of the joint chiefs of staff, to attend a Chiefs of Defense Conference on Countering Violent Extremism being held in Washington on Oct. 23-24, Wuryanto said.

It was not clear why he was stopped from entering the United States, Wuryanto said, adding that the general did not have any problem during his visit to the United States in February 2016.

“We’ve asked for clarification to the U.S., to the Department of State as well as the embassy in Jakarta and until now we’re still waiting for that clarification,” Indonesia’s Foreign Affairs Minister Retno Marsudi told Reuters.

The ministry’s spokesman Arrmanatha Nasir earlier said Indonesia’s embassy in Washington was to send a diplomatic note to the U.S. secretary of state demanding explanation for the incident.The ministry will also summon the U.S. deputy ambassador in Jakarta on Monday to seek explanation, Nasir said, adding that the ambassador is presently not in Indonesia.

The U.S. embassy in Jakarta said in a statement it was in touch with Nurmantyo’s staff to facilitate his travel, but did not explain further.

“U.S. Ambassador Joseph Donovan has apologized to Foreign Minister Retno Marsudi for any inconvenience to General Gatot,” the embassy wrote. “We remain committed to our Strategic Partnership with Indonesia as a way to deliver security and prosperity to both our nations and peoples.”

Nurmantyo has frequently courted controversy in Indonesia because of his actions and what analysts perceive as his political ambitions. The general promotes the notion that Indonesia is besieged by “proxy wars” involving foreign states and even a renewed communist threat.

Indonesian President Joko Widodo said this month that the armed forces should stay out of politics and ensure their loyalty is only to the state and the government.

Indonesia, the world’s biggest Muslim-majority country, generally enjoys good ties with the United States although in the past ties between the two countries’ armed forces have been strained by alleged rights abuses involving Indonesia’s military.