(CNN) -- The military leader who took control of Thailand in a coup in May has been named the country's prime minister.
Thailand's National Legislative Assembly selected General Prayuth Chan-ocha to lead the government in a vote on Thursday.
He was the sole candidate for the post.
Members of the assembly were chosen by Prayuth; more than half are also in the military.
Prayuth seized control of the country on May 22, 2014 after months of unrest destabilized the elected government, led by former Prime Minister Yingluck Shinawatra.
Yingluck's promotion as leader in 2011 led to violent protests and counter-protests amid calls for her to resign.
Critics accused Yingluck of acting as a mouthpiece for her brother, former Prime Minister Thaksin Shinawatra, who was deposed in the last coup in 2006 and is now living in exile.
After taking power, military authorities summoned leading political officials and other prominent figures. It imposed travel bans and delivered the firm message that dissent would not be tolerated.
A curfew was imposed, the military threw out the constitution, and Prayuth announced he'd be assuming powers to act as prime minister until a new one took office.
Prayuth's formal promotion to the role needs to be approved by Thai King Bhumibol Adulyadej, though that's considered a formality. The military leader announced in May that he had the revered King's backing to assume leadership.
Since taking power, the Thai military has enforced the rule of law, seizing guns, arresting suspected criminals and shutting down illegal businesses.