BANGKOK — Indonesia’s Constitutional Court on Thursday rejected a claim by the presidential candidate Prabowo Subianto that he was the victim of widespread fraud in last month’s election.

The decision clears the way for election officials to certify President Joko Widodo as the winner, giving him a second five-year term in office.

More than a thousand supporters of Mr. Prabowo had gathered near the courthouse in Jakarta, the capital, to await the ruling. The police were on high alert and blocked off streets in the area in an effort to avoid a repeat of last month’s violence, which resulted in nine deaths.

According to the election commission’s count, Mr. Prabowo lost to Mr. Joko by nearly 17 million votes, a margin of 55.5 percent to 44.5 percent.