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, an Indonesian official said on Sunday.

Indonesia's Armed Forces Commander General Gatot Nurmantyo was about to board a flight on Saturday when the airline informed him that U.S. authorities had denied him entry, according to Indonesian media reports.

Nurmantyo was going to the United States at the invitation of General Joseph F. Dunford Jr., chairman of the joint chiefs of staff and a former head of the U.S. Marine Corps, according to the reports. He was also due to take part in a forum organised by the Center for Strategic & International Studies in Washington on Monday.

Arrmanatha Nasir, a spokesman for Indonesia's foreign affairs ministry said that Nurmantyo had informed the ministry of the entry denial but the spokesman could not confirm details.

"After receiving that information, our foreign affairs minister has asked our ambassador in Washington DC to send a diplomatic note to the U.S. secretary of state to ask for clarification," he said.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 did not immediately respond to questions about the incident.

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 armed forces.