YANGON, Myanmar — Myanmar’s president, a close friend of leader Aung San Suu Kyi, said Wednesday that he was retiring, a move that puts a representative of the country’s already powerful military at least temporarily in a position of executive power.

An announcement posted on the Facebook page of the Myanmar President Office said 71-year-old Htin Kyaw would step down because he wished to take a rest. It follows reports that he suffered ill health that forced him to travel abroad for medical care at least twice in the past year.

The statement said his post would be filled within seven working days, in line with the constitution.

Htin Kyaw, who became president in 2016, was Myanmar’s first elected civilian president and head of its first government to be elected in free and fair polls since a 1962 military coup.

After he became president, Suu Kyi became Myanmar’s de facto leader when she was named state counsellor, a position created for the country’s once-leading voice for democracy because she’s constitutionally banned from the presidency. A clause in the charter bars anyone with a foreign spouse or child from holding the job. Suu Kyi’s two sons are British, as was her late husband.

By mutual agreement, Htin Kyaw acted as a proxy for Suu Kyi, who is also foreign minister. Suu Kyi had explained publicly — and to public approval — that she would be “above the president.”

Htin Kyaw was “a constitutional president whose role and powers were reduced to that of a figurehead,” said analyst Khin Zaw Win, director of the Tampadipa Institute, a policy advocacy group.

“The new president, whoever he is, needs to take a firmer stand and not let the (state counsellor) do everything,” he said in an email.

He added that Htin Kyaw’s stepping down was widely expected because of his health, but that “there won’t be much of an impact unless his successor provides some unexpected surprises, good or bad.”

Myanmar has two vice presidents, and according to its constitution, 66-year-old First Vice President Myint Swe will serve as acting president. He was nominated for vice president by the military, which retains great influence even in the elected civilian government because it is guaranteed 25 percent of the seats in parliament as well as the three key security portfolios in the Cabinet.

Myint Swe, a former lieutenant general, was chief of military affairs security under the former military government, a position important enough to put him on a U.S. Treasury Department blacklist in 2007 with restrictions on travel and financial transactions, imposed because of the junta’s anti-democratic activities.

He and others were taken off the list in late 2016 as a gesture of support from Washington to Suu Kyi’s government, installed earlier that year. Myint Swe was also regarded as being close to Senior Gen. Than Shwe, who headed the last military government.

When a vote is taken for a new president by both houses of parliament, the choice will be among Myint Swe, Second Vice President Henry Van Thio, who was nominated by the upper house of parliament, and a third candidate to be put forward by the lower house, which had nominated Htin Kyaw. Van Thio is a member of Myanmar’s Chin ethnic minority.

The strong majority held by Suu Kyi’s party allowed it to name Htin Kyaw president in 2016 and should put its new choice, whoever it may be, back in the job again

However, there is the possibility of disruption, said Khin Zaw Win.

“The military was opposed to the creation of the (state counsellor) post right from the beginning. It has been a festering resentment all along,” he said. “And also keep in mind that the new president might have to take over totally from Aung San Suu Kyi. Her future is neither rosy nor assured.”

Htin Kyaw was known more as a personal loyalist to Suu Kyi rather than an active political member of her National League for Democracy party, though his wife is a daughter of one of the party’s founding members. He spent time in jail for helping Suu Kyi try to make an unsanctioned trip out of Yangon under the previous military government, and served as a director of a charitable foundation named after Suu Kyi’s mother.