Ever since Pita Limjaroenrat led his Move Forward Party to a surprise first-place finish in Thailand’s election last month, he’s faced a flurry of legal complaints and controversies challenging his bid to take power after more than a decade of military-backed rule.

Now with parliament scheduled to convene on July 3 and lawmakers expected to vote on a new prime minister in the days or weeks afterward, time is running out for the 42-year-old leader to make sure his victory was anything other than symbolic.

Pita’s biggest challenge remains the 250-member Senate — a body appointed by the royalist military establishment following a 2014 coup, many of whose members oppose his proposal to ease penalties for criticizing the royal family. And they apparently don’t care that he won the most votes.