NAIROBI, Kenya — Burundi’s president announced on Thursday that he would not run for another term, even as he put in place a new Constitution that would theoretically allow him to stay in power until 2034.

The president, Pierre Nkurunziza, told supporters, “I will support the new president who will be elected in 2020,” adding that “a man can change his position in the bed but he cannot change his word.”

Deadly violence and a failed coup attempt followed Mr. Nkurunziza’s decision in 2015 to pursue a third term, which critics called unconstitutional. More than 1,200 people were killed and hundreds of thousands fled Burundi, and last year, International Criminal Court judges authorized an investigation into allegations of state-sponsored crimes.

More than 73 percent of voters in a referendum last month approved changes to the Constitution, which had been promoted by Mr. Nkurunziza and which extended the length of the president’s term from five years to seven. And it would potentially allow the 54-year-old Mr. Nkurunziza, who has been in power in the East African country since 2005, to stand for two seven-year terms after his current five-year one expires in 2020.